aboutsummaryrefslogtreecommitdiffstats
path: root/packages/apex-pdp-docker/src/main/docker
diff options
context:
space:
mode:
authorRashmi Pujar <rashmi.pujar@bell.ca>2019-06-17 10:34:49 -0400
committerRashmi Pujar <rashmi.pujar@bell.ca>2019-06-19 06:22:16 -0400
commit7b945416da394a3ae3e53a1a9ae8d21f6a4e761e (patch)
treea86f73cbc96ff35e6f3863f454be6b464fa59aa7 /packages/apex-pdp-docker/src/main/docker
parentdc2ca16a6d7d8cc13be5716e058add8190ea4479 (diff)
Use io.fabric8:docker-maven-plugin to build and push docker images
Issue-ID: POLICY-969 Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca> Change-Id: Ia3c7c2d6b77d87848c344f212f4a0266db90426e
Diffstat (limited to 'packages/apex-pdp-docker/src/main/docker')
-rw-r--r--packages/apex-pdp-docker/src/main/docker/Dockerfile22
1 files changed, 9 insertions, 13 deletions
diff --git a/packages/apex-pdp-docker/src/main/docker/Dockerfile b/packages/apex-pdp-docker/src/main/docker/Dockerfile
index d8ad55733..5ae7a7c7a 100644
--- a/packages/apex-pdp-docker/src/main/docker/Dockerfile
+++ b/packages/apex-pdp-docker/src/main/docker/Dockerfile
@@ -5,12 +5,9 @@ FROM onap/policy-base-alpine:1.4.0
LABEL maintainer="Policy Team"
-ARG BUILD_VERSION=${BUILD_VERSION}
ARG POLICY_LOGS=/var/log/onap/policy/apex-pdp
-
-ENV BUILD_VERSION ${BUILD_VERSION}
ENV POLICY_HOME=/opt/app/policy/apex-pdp
-ENV POLICY_LOGS=${POLICY_LOGS}
+ENV POLICY_LOGS=$POLICY_LOGS
RUN apk add --no-cache \
vim \
@@ -20,27 +17,26 @@ RUN apk add --no-cache \
# Create apex user and group
RUN addgroup -S apexuser && adduser -S apexuser -G apexuser
-
# Add Apex-specific directories and set ownership as the Apex admin user
-RUN mkdir -p ${POLICY_HOME} \
- && mkdir -p ${POLICY_LOGS} \
- && chown -R apexuser:apexuser ${POLICY_LOGS}
+RUN mkdir -p $POLICY_HOME \
+ && mkdir -p $POLICY_LOGS \
+ && chown -R apexuser:apexuser $POLICY_LOGS
# Unpack the tarball
RUN mkdir /packages
-COPY apex-pdp-package-full.tar.gz /packages
-RUN tar xvfz /packages/apex-pdp-package-full.tar.gz --directory ${POLICY_HOME} \
+COPY /maven/apex-pdp-package-full.tar.gz /packages
+RUN tar xvfz /packages/apex-pdp-package-full.tar.gz --directory $POLICY_HOME \
&& rm /packages/apex-pdp-package-full.tar.gz
# Ensure everything has the correct permissions
RUN find /opt/app -type d -perm 755 \
&& find /opt/app -type f -perm 644 \
- && chmod 755 ${POLICY_HOME}/bin/*
+ && chmod 755 $POLICY_HOME/bin/*
# Copy examples to Apex user area
-RUN cp -pr ${POLICY_HOME}/examples /home/apexuser \
+RUN cp -pr $POLICY_HOME/examples /home/apexuser \
&& chown -R apexuser:apexuser /home/apexuser/*
USER apexuser
-ENV PATH ${POLICY_HOME}/bin:$PATH
+ENV PATH $POLICY_HOME/bin:$PATH
WORKDIR /home/apexuser