aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorromaingimbert <romain.gimbert@orange.com>2019-07-05 15:13:43 +0200
committerromaingimbert <romain.gimbert@orange.com>2019-07-05 16:34:26 +0200
commit6b05f46fb4ed5cf086fcbd416a4f619819f86735 (patch)
tree6d56a0095dc370bee2b167588b8df6a48a2b6b7d /Dockerfile
parentbce9428824803a9f2b03975c7238e52974ec31b2 (diff)
Migrate to jdk 11
-change docker -change pom Change-Id: I5e3beb2b416671b20a7e235ac757ed18a75db4df Issue-ID: EXTAPI-259 Signed-off-by: romaingimbert <romain.gimbert@orange.com>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile9
1 files changed, 3 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 8824c3b..e740c00 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -14,16 +14,13 @@
# limitations under the License.
#
-FROM openjdk:8-jre-alpine
+FROM openjdk:11-jre-slim
ARG SERVER_PORT
ARG PKG_FILENAME=nbi-rest-services-4.0.1-SNAPSHOT.jar
ADD target/$PKG_FILENAME app.jar
-RUN addgroup -S appgroup
-RUN adduser -S appuser -G appgroup
-RUN mkdir temptoscafile
-RUN chown appuser:appgroup temptoscafile/
+RUN addgroup appgroup && useradd -ms /bin/bash appuser && adduser appuser appgroup && mkdir temptoscafile && chown appuser:appgroup temptoscafile/
COPY src/main/resources/certificate /certs
ARG CERT_PASS=changeit
@@ -43,4 +40,4 @@ ENV SERVER_PORT=${SERVER_PORT:-8080}
ENV JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom"
EXPOSE $SERVER_PORT
-ENTRYPOINT java -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap $JAVA_OPTS -jar /app.jar
+ENTRYPOINT java -XX:+UseContainerSupport $JAVA_OPTS -jar /app.jar