From 8f70f2a3586588c6be369756330633d24e4cfe6d Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Mon, 24 Feb 2020 16:07:26 +0200 Subject: Move to jdk11-openjdk-slim (was jre8-alpine) Issue-ID: VID-498 Issue-ID: VID-756 Change-Id: Ia95e99f464d7f2e107821492cef522badee693fc Signed-off-by: Ittay Stern --- deliveries/src/main/docker/docker-files/Dockerfile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'deliveries/src/main/docker') diff --git a/deliveries/src/main/docker/docker-files/Dockerfile b/deliveries/src/main/docker/docker-files/Dockerfile index f6070d8b1..be6c08bc3 100755 --- a/deliveries/src/main/docker/docker-files/Dockerfile +++ b/deliveries/src/main/docker/docker-files/Dockerfile @@ -1,9 +1,17 @@ -FROM tomcat:9.0-jre8-alpine +FROM tomcat:9-jdk11-openjdk-slim # add vim and uncomment alias to speedup troubleshooting purpose RUN apk update && apk add openjdk8 vim net-tools -RUN adduser --disabled-password onap onap +ARG user=onap +ARG group=onap + +# Create a group and user +RUN groupadd -r $group && useradd -ms /bin/bash $user -g $group && \ + mkdir /opt/$user && \ + chown -R $user:$group /opt/$user && \ + mkdir /var/log/$user && \ + chown -R $user:$group /var/log/$user # MariaDB variables ENV VID_MYSQL_HOST="vid-mariadb-docker-instance" \ @@ -87,7 +95,7 @@ ADD maven/config/server.xml ${VID_TOMCAT_PATH} ADD maven/scripts/*.sh /tmp/vid/ ADD maven/artifacts/vid.war /tmp/vid/stage/ -RUN chown onap:onap /tmp/vid /usr/local/tomcat -R +RUN chown $user:$group /tmp/vid /usr/local/tomcat -R RUN chmod +x /tmp/vid/localize.sh -USER onap +USER $user CMD ["/tmp/vid/localize.sh"] -- cgit 1.2.3-korg