File tree Expand file tree Collapse file tree
w/wildfly/Dockerfiles/32.0.0_ubi9 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM registry.access.redhat.com/ubi9/ubi-minimal:9.3
2+
3+ RUN microdnf install --best --nodocs -y tar gzip zip shadow-utils && microdnf clean all
4+
5+ WORKDIR /opt/jboss
6+
7+ RUN groupadd -r jboss -g 1000 && useradd -u 1000 -r -g jboss -m -d /opt/jboss -s /sbin/nologin -c "JBoss user" jboss && \
8+ chmod 755 /opt/jboss
9+
10+ # Set the PACKAGE_VERSION env variable
11+ ENV PACKAGE_VERSION 32.0.0.Final
12+ ENV WILDFLY_SHA1=9b6d762aa4662045fc3e7329a1ed1c0d457daf6d
13+ ENV JBOSS_HOME /opt/jboss/wildfly
14+
15+ USER root
16+
17+ # Add the WildFly distribution to /opt, and make wildfly the owner of the extracted tar content
18+ # Make sure the distribution is available from a well-known place
19+ RUN cd $HOME \
20+ && curl -L -O https://github.com/wildfly/wildfly/releases/download/$PACKAGE_VERSION/wildfly-$PACKAGE_VERSION.tar.gz \
21+ && sha1sum wildfly-$PACKAGE_VERSION.tar.gz | grep $WILDFLY_SHA1 \
22+ && tar -xf wildfly-$PACKAGE_VERSION.tar.gz \
23+ && mv $HOME/wildfly-$PACKAGE_VERSION $JBOSS_HOME \
24+ && rm wildfly-$PACKAGE_VERSION.tar.gz \
25+ && chown -R jboss:0 ${JBOSS_HOME} \
26+ && chmod -R g+rw ${JBOSS_HOME}
27+
28+ # Ensure signals are forwarded to the JVM process correctly for graceful shutdown
29+ ENV LAUNCH_JBOSS_IN_BACKGROUND true
30+
31+ USER jboss
32+
33+ # Expose the ports in which we're interested
34+ EXPOSE 8080
35+
36+ # Set the default command to run on boot
37+ # This will boot WildFly in standalone mode and bind to all interfaces
38+ CMD ["/opt/jboss/wildfly/bin/standalone.sh" , "-b" , "0.0.0.0" ]
Original file line number Diff line number Diff line change 1+ To build a Dockerfile: docker build -t wildlfy .
2+
3+ To run a dockerfile: docker run -it -p 8080:8080 -p 9990:9990 -d wildlfy
You can’t perform that action at this time.
0 commit comments