From 07090b2d199108935a028afa3bb43d3bf5190723 Mon Sep 17 00:00:00 2001 From: "Singal, Kapil (ks220y)" Date: Tue, 15 Sep 2020 19:49:35 -0400 Subject: Fixing DockerFiles refactoring to use onap certified base image and combining run commands Issue-ID: CCSDK-2794 Signed-off-by: Singal, Kapil (ks220y) Change-Id: Id31d5a0018cbce14e54f4aa3e5caebb75dda2276 --- .../application/src/main/docker/Dockerfile | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'ms/blueprintsprocessor/application') diff --git a/ms/blueprintsprocessor/application/src/main/docker/Dockerfile b/ms/blueprintsprocessor/application/src/main/docker/Dockerfile index b0efcbe36..6326bb862 100755 --- a/ms/blueprintsprocessor/application/src/main/docker/Dockerfile +++ b/ms/blueprintsprocessor/application/src/main/docker/Dockerfile @@ -1,23 +1,21 @@ -FROM alpine:latest AS extractor +FROM onap/ccsdk-alpine-j11-image:1.0.1 + +USER root +# add entrypoint +COPY startService.sh /opt/app/onap/blueprints-processor/startService.sh +# add application COPY @project.build.finalName@-@assembly.id@.tar.gz /source.tar.gz 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@ - -FROM onap/ccsdk-alpine-j11-image:1.0.1 - -USER root -# add entrypoint -COPY startService.sh /opt/app/onap/blueprints-processor/startService.sh -RUN chown onap:onap /opt/app/onap/blueprints-processor/startService.sh \ - && touch /velocity.log && chmod 755 /velocity.log && chown onap:onap /velocity.log \ + && 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 -# add application -COPY --from=extractor /opt /opt -RUN mkdir -p /opt/app/onap/blueprints/deploy && chown onap:onap /opt -R - USER onap ENTRYPOINT [ "/opt/app/onap/blueprints-processor/startService.sh" ] -- cgit 1.2.3-korg