summaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/application
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/application')
-rwxr-xr-xms/blueprintsprocessor/application/pom.xml1
-rwxr-xr-xms/blueprintsprocessor/application/src/main/docker/Dockerfile27
2 files changed, 20 insertions, 8 deletions
diff --git a/ms/blueprintsprocessor/application/pom.xml b/ms/blueprintsprocessor/application/pom.xml
index db3bb949a..701d8139b 100755
--- a/ms/blueprintsprocessor/application/pom.xml
+++ b/ms/blueprintsprocessor/application/pom.xml
@@ -406,6 +406,7 @@
<name>${image.name}</name>
<build>
<cleanup>try</cleanup>
+ <noCache>true</noCache>
<dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
<tags>
<tag>${project.docker.latestminortag.version}</tag>
diff --git a/ms/blueprintsprocessor/application/src/main/docker/Dockerfile b/ms/blueprintsprocessor/application/src/main/docker/Dockerfile
index 876bc35de..d4b403e7c 100755
--- a/ms/blueprintsprocessor/application/src/main/docker/Dockerfile
+++ b/ms/blueprintsprocessor/application/src/main/docker/Dockerfile
@@ -1,8 +1,11 @@
-FROM onap/ccsdk-alpine-j11-image:1.1.0
-
+# Prepare stage for multistage image build
+## START OF STAGE0 ##
+FROM onap/ccsdk-alpine-j11-image:1.1.2 AS stage0
USER root
+
# add entrypoint
-COPY startService.sh /opt/app/onap/blueprints-processor/startService.sh
+COPY *.sh /opt/app/onap/blueprints-processor/
+
# add application
COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz
@@ -10,12 +13,20 @@ RUN tar -xzf /source.tar.gz -C /tmp \
&& cp -rf /tmp/@project.build.finalName@/opt / \
&& rm -rf /source.tar.gz \
&& rm -rf /tmp/@project.build.finalName@ \
- && touch /velocity.log \
- && chown onap:onap /velocity.log \
- && chmod 755 /velocity.log \
&& mkdir -p /opt/app/onap/blueprints/deploy \
- && chown onap:onap /opt -R \
- && chmod 755 /opt/app/onap/blueprints-processor/startService.sh
+ && touch /velocity.log \
+ && chown -R onap:onap /opt /velocity.log \
+ && chmod -R 755 /opt /velocity.log
+
+## END OF STAGE0 ##
+
+
+## This will create actual image
+FROM onap/ccsdk-alpine-j11-image:1.1.2
+USER root
+
+COPY --from=stage0 /opt /opt
+COPY --from=stage0 /velocity.log /velocity.log
USER onap
ENTRYPOINT [ "/opt/app/onap/blueprints-processor/startService.sh" ]