From 1dcfae11727351cb9583e75831199ecf441e6e52 Mon Sep 17 00:00:00 2001 From: Hengye Date: Thu, 28 Feb 2019 08:03:50 +0000 Subject: 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 --- packages/apex-pdp-docker/src/main/docker/Dockerfile | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'packages/apex-pdp-docker/src/main/docker') 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/* -- cgit 1.2.3-korg