-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
42 lines (32 loc) · 1.47 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
FROM openjdk:17
MAINTAINER Jens Piegsa <piegsa@gmail.com>
ENV WILDFLY_VERSION 26.0.1.Final
ENV WILDFLY_SHA1 08908faf9ae99e5fb6374979afbffea461aadc2c
ENV JBOSS_HOME /opt/wildfly
ADD run.sh /
ADD create_wildfly_admin_user.sh /
# Add the WildFly distribution to /opt, and make wildfly the owner of the extracted tar content
# Make sure the distribution is available from a well-known place
RUN cd $HOME \
&& curl -LOs https://github.com/wildfly/wildfly/releases/download/$WILDFLY_VERSION/wildfly-$WILDFLY_VERSION.tar.gz \
&& sha1sum wildfly-$WILDFLY_VERSION.tar.gz | grep $WILDFLY_SHA1 \
&& tar xf wildfly-$WILDFLY_VERSION.tar.gz \
&& mv $HOME/wildfly-$WILDFLY_VERSION $JBOSS_HOME \
&& rm wildfly-$WILDFLY_VERSION.tar.gz \
&& mkdir $JBOSS_HOME/standalone/data \
&& mkdir $JBOSS_HOME/standalone/log \
&& groupadd -r wildfly -g 433 \
&& useradd -u 431 -r -g wildfly -d $JBOSS_HOME -s /bin/false -c "WildFly user" wildfly \
&& chown wildfly:wildfly $JAVA_HOME/lib/security/cacerts \
&& chmod +x /create_wildfly_admin_user.sh /run.sh \
&& chown -R wildfly:wildfly $JBOSS_HOME/
# Ensure signals are forwarded to the JVM process correctly for graceful shutdown
ENV LAUNCH_JBOSS_IN_BACKGROUND true
EXPOSE 8080 9990 8443 9993 5005
USER wildfly
VOLUME $JBOSS_HOME/standalone/configuration
VOLUME $JBOSS_HOME/standalone/data
VOLUME $JBOSS_HOME/standalone/tmp
VOLUME $JBOSS_HOME/standalone/log
RUN ls -Ralph $JBOSS_HOME/standalone
CMD ["/run.sh"]