Updated Dockerfile for hello-swarm to use UBI images
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
FROM registry.access.redhat.com/rhel7:7.6
|
FROM registry.access.redhat.com/ubi8/ubi:8.0
|
||||||
|
|
||||||
MAINTAINER Red Hat Training <training@redhat.com>
|
MAINTAINER Red Hat Training <training@redhat.com>
|
||||||
|
|
||||||
@@ -7,14 +7,13 @@ ENV JAVA_OPTIONS -Xmx512m
|
|||||||
|
|
||||||
|
|
||||||
# Install the Java runtime, create a user for running the app, and set permissions
|
# Install the Java runtime, create a user for running the app, and set permissions
|
||||||
RUN rpm --rebuilddb && \
|
RUN dnf install -y --noplugins java-1.8.0-openjdk-headless && \
|
||||||
yum install -y --noplugins java-1.8.0-openjdk-headless && \
|
dnf clean all --noplugins -y && \
|
||||||
yum clean all --noplugins -y && \
|
|
||||||
useradd wildfly && \
|
useradd wildfly && \
|
||||||
mkdir -p /opt/app-root/bin
|
mkdir -p /opt/app-root/bin
|
||||||
|
|
||||||
# Copy the runnable fat JAR to the container.
|
# Copy the runnable fat JAR to the container.
|
||||||
ADD http://content.example.com/ocp4.0/x86_64/installers/hello-swarm.jar /opt/app-root/bin/
|
ADD https://github.com/RedHatTraining/DO288-apps/releases/download/1.0/hello-swarm.jar /opt/app-root/bin/
|
||||||
|
|
||||||
COPY run-app.sh /opt/app-root/bin/
|
COPY run-app.sh /opt/app-root/bin/
|
||||||
|
|
||||||
@@ -26,4 +25,4 @@ EXPOSE 8080
|
|||||||
USER wildfly
|
USER wildfly
|
||||||
|
|
||||||
# Run the fat JAR
|
# Run the fat JAR
|
||||||
CMD /opt/app-root/bin/run-app.sh
|
CMD /opt/app-root/bin/run-app.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user