diff options
author | Hengye <yehui.wang@est.tech> | 2019-02-28 08:03:50 +0000 |
---|---|---|
committer | Hengye <yehui.wang@est.tech> | 2019-02-28 08:03:50 +0000 |
commit | 1dcfae11727351cb9583e75831199ecf441e6e52 (patch) | |
tree | 5c13295c2f0a3f2d4b99c6c2cb38ed4677585842 /packages/apex-pdp-docker/src | |
parent | 3bbf5d0d753fa4ac55c9e5a31ae450a5bcfc6a28 (diff) |
Use Alpine as base docker image
change docker base image from ubuntu 16.04 to Alpine 3.9
Issue-ID: POLICY-1555
Change-Id: Ia21f5e8185bd26f4b04276eed204ac358f655a59
Signed-off-by: Hengye <yehui.wang@est.tech>
Diffstat (limited to 'packages/apex-pdp-docker/src')
-rw-r--r-- | packages/apex-pdp-docker/src/main/docker/Dockerfile | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/packages/apex-pdp-docker/src/main/docker/Dockerfile b/packages/apex-pdp-docker/src/main/docker/Dockerfile index cd6839333..1423c8714 100644 --- a/packages/apex-pdp-docker/src/main/docker/Dockerfile +++ b/packages/apex-pdp-docker/src/main/docker/Dockerfile @@ -1,19 +1,13 @@ # -# Docker file to build an image that runs APEX on Java 8 in Ubuntu +# Docker file to build an image that runs APEX on Java 8 in alpine # -FROM ubuntu:16.04 +FROM alpine:3.9 -RUN apt-get update && \ - apt-get upgrade -y && \ - apt-get install -y zip unzip curl wget ssh iproute2 iputils-ping vim && \ - apt-get install -y software-properties-common && \ - add-apt-repository ppa:openjdk-r/ppa -y && \ - apt-get update && \ - apt-get install -y openjdk-8-jdk +RUN apk add --no-cache --update bash zip unzip curl wget openssh iproute2 iputils vim openjdk8 # Create apex user and group -RUN groupadd apexuser -RUN useradd --create-home -g apexuser apexuser +RUN addgroup -S apexuser && adduser -S apexuser -G apexuser + # Add Apex-specific directories and set ownership as the Apex admin user RUN mkdir -p /opt/app/policy/apex-pdp @@ -33,8 +27,6 @@ RUN chmod a+x /opt/app/policy/apex-pdp/bin/* # Copy examples to Apex user area RUN cp -pr /opt/app/policy/apex-pdp/examples /home/apexuser - -RUN apt-get clean RUN chown -R apexuser:apexuser /home/apexuser/* |