aboutsummaryrefslogtreecommitdiffstats
path: root/policy-common/alpine/src
diff options
context:
space:
mode:
authorDmitry Puzikov <dmitry.puzikov@tieto.com>2019-03-27 13:55:13 +0100
committerDmitry Puzikov <dmitry.puzikov@tieto.com>2019-03-27 13:55:13 +0100
commit7830af09b0f682f61d9109b2a296b09450f5ae17 (patch)
tree041b4603177dca72c15bcb419388e085511764f5 /policy-common/alpine/src
parent0fa4eee2cd6a5bef795ea04273ca95c4fe69ed32 (diff)
Base and common images for Policy apps
Alpine based base and common images to use across Policy project Change-Id: I01d504b48ee361d1751dfa982e1515705b9e343e Issue-ID: INT-996 Signed-off-by: Dmitry Puzikov <dmitry.puzikov@tieto.com>
Diffstat (limited to 'policy-common/alpine/src')
-rw-r--r--policy-common/alpine/src/main/docker/Dockerfile34
1 files changed, 34 insertions, 0 deletions
diff --git a/policy-common/alpine/src/main/docker/Dockerfile b/policy-common/alpine/src/main/docker/Dockerfile
new file mode 100644
index 00000000..19ea230c
--- /dev/null
+++ b/policy-common/alpine/src/main/docker/Dockerfile
@@ -0,0 +1,34 @@
+#
+# Docker file to build an image that contains commom packages for Policy apps
+#
+FROM onap/policy-base-alpine
+
+LABEL maintainer="Policy Team"
+
+ARG HTTP_PROXY=${HTTP_PROXY}
+ARG HTTPS_PROXY=${HTTPS_PROXY}
+ARG BUILD_VERSION=${BUILD_VERSION}
+
+ENV http_proxy $HTTP_PROXY
+ENV https_proxy $HTTPS_PROXY
+ENV BUILD_VERSION ${BUILD_VERSION}
+ENV POLICY_HOME=/opt/app/policy
+
+# Install common packages used in 6 out of 7 images
+RUN apk add --no-cache \
+ busybox-extras \
+ httpie \
+ jq \
+ maven \
+ py-pip \
+ python
+
+# Create policy user and group
+RUN addgroup -S policy && \
+ adduser -S --shell /bin/bash -G policy policy
+
+# Create common directories and change owner
+RUN mkdir -p \
+ ${POLICY_HOME}/etc/ssl \
+ && chown -R policy:policy ${POLICY_HOME} ${POLICY_HOME}/etc/ssl
+