Update Dockerfile for PF base image 75/133275/1
authorliamfallon <liam.fallon@est.tech>
Thu, 16 Feb 2023 12:03:09 +0000 (12:03 +0000)
committerliamfallon <liam.fallon@est.tech>
Thu, 16 Feb 2023 12:03:13 +0000 (12:03 +0000)
The Policy Framework base image run under the "onap" user rather than
under the "root" user. This means that root access has to be enabled in
child Dockerfiles for configuraiton that requires root access.

Root access is turned off again later in the Dockerfile so that the
image will run under another user.

Issue-ID: POLICY-4558
Change-Id: Ie3178fcda9bedd47a1fc13d819bf4cfdc74c7a3f
Signed-off-by: liamfallon <liam.fallon@est.tech>
packages/docker/src/main/docker/Dockerfile

index d570874..29e97c9 100644 (file)
@@ -50,9 +50,11 @@ ENV MVN_SNAPSHOT_REPO_URL $MVN_SNAPSHOT_REPO_URL
 ENV MVN_RELEASE_REPO_URL $MVN_RELEASE_REPO_URL
 ENV http_proxy $http_proxy
 
+USER root
 RUN apk update && \
     apk add --no-cache mariadb-client \
     file \
+    maven \
     net-tools netcat-openbsd sudo less vim openssl \
     && python3 -m pip install --no-cache-dir --upgrade setuptools http-prompt \
     && python3 -m pip install --no-cache-dir httpie