Commit 71bec52a authored by ipatini's avatar ipatini
Browse files

EMS: Control Service: Updated Dockerfile to use 'adoptopenjdk:8-jre' base...

EMS: Control Service: Updated Dockerfile to use 'adoptopenjdk:8-jre' base image, install 'dumb-init' and run EMS with 'emsuser' rather than root
parent 6cf32ac7
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# https://www.mozilla.org/en-US/MPL/2.0/ # https://www.mozilla.org/en-US/MPL/2.0/
# #
FROM java:8-alpine FROM adoptopenjdk:8-jre
ENV BASEDIR /opt/ems-server ENV BASEDIR /opt/ems-server
ENV MELODIC_CONFIG_DIR ${BASEDIR}/config ENV MELODIC_CONFIG_DIR ${BASEDIR}/config
...@@ -15,7 +15,7 @@ ENV PAASAGE_CONFIG_DIR ${BASEDIR}/config ...@@ -15,7 +15,7 @@ ENV PAASAGE_CONFIG_DIR ${BASEDIR}/config
ENV JAR_PATH ${BASEDIR}/jars ENV JAR_PATH ${BASEDIR}/jars
WORKDIR ${BASEDIR} WORKDIR ${BASEDIR}
RUN /bin/sh -c "apk add --no-cache bash" RUN apt-get update && apt-get install -y dumb-init && rm -rf /var/lib/apt/lists/*
ADD bin ./bin ADD bin ./bin
ADD jars ./jars ADD jars ./jars
...@@ -25,4 +25,8 @@ ADD config ./config ...@@ -25,4 +25,8 @@ ADD config ./config
RUN mkdir logs RUN mkdir logs
RUN bash -c 'chmod +rx ./bin/*.sh' RUN bash -c 'chmod +rx ./bin/*.sh'
ENTRYPOINT ["./bin/run.sh"] RUN adduser --system --home ${BASEDIR} --no-create-home --shell /bin/false --group emsuser
\ No newline at end of file RUN chown -R emsuser:emsuser ${BASEDIR}
USER emsuser
ENTRYPOINT ["dumb-init", "./bin/run.sh"]
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment