Ravi Srinivasan
2019-06-04 de664729bc8ba8bb9a93a29947a1255fdeb90707
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
FROM   FROM registry.access.redhat.com/ubi8/ubi:8.0
 
MAINTAINER   Red Hat Training <training@redhat.com>
 
# command line options to pass to the JVM
ENV      JAVA_OPTIONS -Xmx512m
 
 
# Install the Java runtime, create a user for running the app, and set permissions
RUN   yum install -y --disableplugin=subscription-manager java-1.8.0-openjdk-headless && \
      yum clean all --disableplugin=subscription-manager -y && \
      useradd wildfly && \
      mkdir -p /opt/app-root/bin
 
# Copy the runnable fat JAR to the container.
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/
 
RUN   chown -R wildfly:wildfly /opt/app-root && \
      chmod -R 700 /opt/app-root
 
EXPOSE 8080
 
USER  wildfly
 
# Run the fat JAR
CMD   /opt/app-root/bin/run-app.sh