diff options
author | 2019-04-22 18:41:18 +0300 | |
---|---|---|
committer | 2019-04-22 18:41:18 +0300 | |
commit | f6668af5c6a624dc3053a2217dacce82ad7b547a (patch) | |
tree | a8f7e7c0d78f8eafa4e128c50010cae49533cdab /components/bbs-event-processor/pom.xml | |
parent | da4ba6e2c81f3dd7157e1cc06a92e91c5a38aa95 (diff) |
Run BBS-ep docker container as non-root
Replaced docker maven plugin to introduce Dockerfile.
Corrected component blueprint to deploy BBS-ep as a service component
instead of a platform one.
Change-Id: If3af67eef1a9f68554ee215d24b54f9cd4b7ce80
Issue-ID: DCAEGEN2-1446
Signed-off-by: Stavros Kanarakis <stavros.kanarakis@nokia.com>
Diffstat (limited to 'components/bbs-event-processor/pom.xml')
-rw-r--r-- | components/bbs-event-processor/pom.xml | 55 |
1 files changed, 21 insertions, 34 deletions
diff --git a/components/bbs-event-processor/pom.xml b/components/bbs-event-processor/pom.xml index a4a0ffdb..3615da05 100644 --- a/components/bbs-event-processor/pom.xml +++ b/components/bbs-event-processor/pom.xml @@ -40,7 +40,6 @@ <bbs-event-processor.main.class>org.onap.bbs.event.processor.Application</bbs-event-processor.main.class> <dependency.dir.name>libs</dependency.dir.name> <dependency.dir.location>${project.build.directory}/${dependency.dir.name}</dependency.dir.location> - <docker.artifact.dir>/opt</docker.artifact.dir> <docker.image.name>onap/${project.groupId}.${project.artifactId}</docker.image.name> <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format> </properties> @@ -249,8 +248,8 @@ </plugin> <plugin> <groupId>com.spotify</groupId> - <artifactId>docker-maven-plugin</artifactId> - <version>1.2.0</version> + <artifactId>dockerfile-maven-plugin</artifactId> + <version>1.4.10</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -323,29 +322,17 @@ </plugin> <plugin> <groupId>com.spotify</groupId> - <artifactId>docker-maven-plugin</artifactId> + <artifactId>dockerfile-maven-plugin</artifactId> <configuration> - <serverId>${onap.nexus.dockerregistry.daily}</serverId> - <imageName>${docker.image.name}</imageName> - <imageTags> - <tag>latest</tag> - </imageTags> - <baseImage>openjdk:${java.version}-jre-alpine</baseImage> - <workdir>${docker.artifact.dir}</workdir> - <resources> - <resource> - <directory>${dependency.dir.location}</directory> - <targetPath>${dependency.dir.name}</targetPath> - </resource> - <resource> - <directory>${project.build.directory}</directory> - <include>${project.build.finalName}.jar</include> - </resource> - </resources> - <exposes> - <expose>8100</expose> - </exposes> - <entryPoint>["java", "-jar", "${project.build.finalName}.jar"]</entryPoint> + <contextDirectory>${project.basedir}</contextDirectory> + <repository>${docker.image.name}</repository> + <tag>latest</tag> + <buildArgs> + <PROJECT_BUILD_DIR_NAME>target</PROJECT_BUILD_DIR_NAME> + <DEPENDENCIES_DIR>${dependency.dir.name}</DEPENDENCIES_DIR> + <DOCKER_ARTIFACT_DIR>/opt</DOCKER_ARTIFACT_DIR> + <FINAL_JAR>${project.build.finalName}.jar</FINAL_JAR> + </buildArgs> </configuration> <executions> <execution> @@ -360,11 +347,11 @@ <phase>deploy</phase> <goals> <goal>tag</goal> + <goal>push</goal> </goals> <configuration> - <image>${docker.image.name}:latest</image> - <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:latest</newName> - <pushImage>true</pushImage> + <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository> + <tag>latest</tag> </configuration> </execution> <execution> @@ -372,11 +359,11 @@ <phase>deploy</phase> <goals> <goal>tag</goal> + <goal>push</goal> </goals> <configuration> - <image>${docker.image.name}:latest</image> - <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}</newName> - <pushImage>true</pushImage> + <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository> + <tag>${project.version}</tag> </configuration> </execution> <execution> @@ -384,11 +371,11 @@ <phase>deploy</phase> <goals> <goal>tag</goal> + <goal>push</goal> </goals> <configuration> - <image>${docker.image.name}:latest</image> - <newName>${onap.nexus.dockerregistry.daily}/${docker.image.name}:${project.version}-${maven.build.timestamp}Z</newName> - <pushImage>true</pushImage> + <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository> + <tag>${project.version}-${maven.build.timestamp}Z</tag> </configuration> </execution> </executions> |