summaryrefslogtreecommitdiffstats
path: root/packages/apex-pdp-docker
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-03-01 12:56:58 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-01 12:56:58 +0000
commitf01b09965093e027323b320601d5d5566c0d3825 (patch)
tree81db5f0aa98edf655b2e9c2409a51ef3fa2dea85 /packages/apex-pdp-docker
parentee74a146a62de39228a2f7128c00c419d1102792 (diff)
parent1dcfae11727351cb9583e75831199ecf441e6e52 (diff)
Merge "Use Alpine as base docker image"
Diffstat (limited to 'packages/apex-pdp-docker')
-rw-r--r--packages/apex-pdp-docker/src/main/docker/Dockerfile18
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/*