diff options
author | Ittay Stern <ittay.stern@att.com> | 2020-02-24 16:07:26 +0200 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2020-02-24 16:43:09 +0200 |
commit | 8f70f2a3586588c6be369756330633d24e4cfe6d (patch) | |
tree | 9446bd09242ecb75d94938bcb5339df84db199b0 | |
parent | 0f8e77d9ae21a0738c7c66b9522b5f7dce785015 (diff) |
Move to jdk11-openjdk-slim (was jre8-alpine)
Issue-ID: VID-498
Issue-ID: VID-756
Change-Id: Ia95e99f464d7f2e107821492cef522badee693fc
Signed-off-by: Ittay Stern <ittay.stern@att.com>
-rwxr-xr-x | deliveries/src/main/docker/docker-files/Dockerfile | 16 |
1 files changed, 12 insertions, 4 deletions
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"] |