-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (34 loc) · 1.23 KB
/
Dockerfile
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
# dockerfile to build image for JBoss EAP 6.4
# start from rhel 7.2
#FROM ubi7
FROM registry.access.redhat.com/ubi7
# update OS
RUN yum -y update && \
yum -y install sudo openssh-clients unzip java-1.8.0-openjdk-devel && \
yum clean all
# enabling sudo group
# enabling sudo over ssh
RUN echo '%wheel ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers && \
sed -i 's/.*requiretty$/Defaults !requiretty/' /etc/sudoers
# add a user for the application, with sudo permissions
RUN useradd -m jboss ; echo jboss: | chpasswd ; usermod -a -G wheel jboss
# create workdir
RUN mkdir -p /opt/jboss
WORKDIR /opt/jboss
# install JBoss EAP 6.4.0
ADD jboss-eap-6.4.0.zip /opt/jboss
RUN unzip /opt/jboss/jboss-eap-6.4.0.zip
# set environment
ENV JBOSS_HOME /opt/jboss/jboss-eap-6.4
# create JBoss console user
RUN $JBOSS_HOME/bin/add-user.sh admin admin@2022 --silent
# configure JBoss
RUN echo "JAVA_OPTS=\"$JAVA_OPTS -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0\"" >> $JBOSS_HOME/bin/standalone.conf
# set permission folder
RUN chown -R jboss:jboss /opt/jboss
# JBoss ports
EXPOSE 8080 9990 9999
# start JBoss
ENTRYPOINT $JBOSS_HOME/bin/standalone.sh -c standalone-full-ha.xml
USER jboss
CMD /bin/bash