-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·67 lines (50 loc) · 2.31 KB
/
Copy pathDockerfile
File metadata and controls
executable file
·67 lines (50 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#######################################################################
# Creates a base Fedora image with JBoss EAP-6.3.0.GA r1 #
#######################################################################
# Use the fedora base image
FROM fedora:latest
MAINTAINER cmondesir <cmondesi@redhat.com> gmollison <grapesfrog@gmail.com>
# Update the system
RUN yum -y update;yum clean all
# enabling sudo group for jboss
RUN echo '%jboss ALL=(ALL) ALL' >> /etc/sudoers
# Create jboss user
RUN useradd -m -d /home/jboss -p jboss jboss
##########################################################
# Install Java JDK
##########################################################
RUN yum -y install java-1.7.0-openjdk
ENV JAVA_HOME /usr/lib/jvm/jre
############################################
# Install EAP 6.3.0.GA and r1
############################################
USER jboss
ENV INSTALLDIR /home/jboss/EAP-6.3.0
ENV HOME /home/jboss
RUN mkdir $INSTALLDIR && \
mkdir $INSTALLDIR/installer && \
mkdir $INSTALLDIR/patches && \
mkdir $INSTALLDIR/resources
ADD installer/jboss-eap-6.3.0-installer.jar $INSTALLDIR/installer/jboss-eap-6.3.0-installer.jar
ADD patches/jboss-eap-6.3.1-patch.zip $INSTALLDIR/patches/jboss-eap-6.3.1-patch.zip
ADD resources/auto.xml $INSTALLDIR/resources/auto.xml
ADD resources/auto.xml.variables $INSTALLDIR/resources/auto.xml.variables
RUN java -jar $INSTALLDIR/installer/jboss-eap-6.3.0-installer.jar $INSTALLDIR/resources/auto.xml -variablefile $INSTALLDIR/resources/auto.xml.variables
RUN $INSTALLDIR/jboss-eap-6.3/bin/jboss-cli.sh "patch apply $INSTALLDIR/patches/jboss-eap-6.3.1-patch.zip"
############################################
# Create start script to run EAP instance
############################################
USER root
RUN echo "#!/bin/sh" >> $HOME/start.sh
RUN echo "echo JBoss EAP Start script" >> $HOME/start.sh
RUN echo "runuser -l jboss -c '$HOME/EAP-6.3.0/jboss-eap-6.3/bin/standalone.sh -c standalone-full.xml -b 0.0.0.0 -bmanagement 0.0.0.0'" >> $HOME/start.sh
RUN chmod +x $HOME/start.sh
############################################
# Remove install artifacts
############################################
RUN rm -rf $INSTALLDIR/installer
RUN rm -rf $INSTALLDIR/patches
RUN rm -rf $INSTALLDIR/resources
EXPOSE 22 5455 9999 8080 5432 4447 5445 9990 3528
CMD /home/jboss/start.sh
# Finished