From 879dbd69fd7801798d8e2e2662de1758accb9105 Mon Sep 17 00:00:00 2001 From: Jack Lucas Date: Wed, 4 Mar 2020 11:06:57 -0500 Subject: Run bootstrap container as non-root user Issue-ID: DCAEGEN2-2072 Signed-off-by: Jack Lucas Change-Id: I2555fdd6d1606d9f05a8711cf1fdacd43a9a1e35 --- Dockerfile-template | 9 +++++++++ pom.xml | 2 +- version.properties | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile-template b/Dockerfile-template index 8c2e084..54609ca 100644 --- a/Dockerfile-template +++ b/Dockerfile-template @@ -61,3 +61,12 @@ COPY blueprints/ /blueprints # Set up runtime script ENTRYPOINT exec "/scripts/bootstrap.sh" + +# Set up a non-root user +RUN mkdir -p /opt/bootstrap \ + && useradd -d /opt/bootstrap bootstrap \ + && chown -R bootstrap:bootstrap /opt/bootstrap \ + && chown -R bootstrap:bootstrap /scripts \ + && chown -R bootstrap:bootstrap /blueprints \ + && chown -R bootstrap:bootstrap /opt/consul +USER bootstrap diff --git a/pom.xml b/pom.xml index 3474eb8..8dc0c15 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. org.onap.dcaegen2.deployments k8s-bootstrap-container dcaegen2-deployments-k8s-bootstrap-container - 1.11.0-SNAPSHOT + 1.12.0-SNAPSHOT http://maven.apache.org pom diff --git a/version.properties b/version.properties index 4d2c8f5..55e12fc 100644 --- a/version.properties +++ b/version.properties @@ -1,5 +1,5 @@ major=1 -minor=11 +minor=12 patch=0 base_version=${major}.${minor}.${patch} release_version=${base_version} -- cgit 1.2.3-korg