From 7830af09b0f682f61d9109b2a296b09450f5ae17 Mon Sep 17 00:00:00 2001 From: Dmitry Puzikov Date: Wed, 27 Mar 2019 13:55:13 +0100 Subject: 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 --- policy-base/alpine/README.md | 3 + policy-base/alpine/pom.xml | 145 ++++++++++++++++++++++++++ policy-base/alpine/src/main/docker/Dockerfile | 23 ++++ policy-base/pom.xml | 53 ++++++++++ 4 files changed, 224 insertions(+) create mode 100644 policy-base/alpine/README.md create mode 100644 policy-base/alpine/pom.xml create mode 100644 policy-base/alpine/src/main/docker/Dockerfile create mode 100644 policy-base/pom.xml (limited to 'policy-base') diff --git a/policy-base/alpine/README.md b/policy-base/alpine/README.md new file mode 100644 index 00000000..71204051 --- /dev/null +++ b/policy-base/alpine/README.md @@ -0,0 +1,3 @@ +The base image for Policy project images. +Contains basic set of packages used in every Policy app container. + diff --git a/policy-base/alpine/pom.xml b/policy-base/alpine/pom.xml new file mode 100644 index 00000000..cc811af8 --- /dev/null +++ b/policy-base/alpine/pom.xml @@ -0,0 +1,145 @@ + + + + + 4.0.0 + + + org.onap.policy.docker + policy-base + 2.1.0-SNAPSHOT + + + pom + policy-base-alpine + Policy alpine base docker image + Policy alpine base docker image + + + ${project.artifactId}-${project.version} + + + org.codehaus.groovy.maven + gmaven-plugin + 1.0 + + + validate + + execute + + + + println 'Project version: ' + project.properties['dist.project.version']; + def versionArray; + if ( project.properties['dist.project.version'] != null ) { + versionArray = project.properties['dist.project.version'].split('-'); + } + + if ( project.properties['dist.project.version'].endsWith("-SNAPSHOT") ) { + project.properties['project.docker.latesttag.version']=versionArray[0] + "-SNAPSHOT-latest"; + } else { + project.properties['project.docker.latesttag.version']=versionArray[0] + "-STAGING-latest"; + } + + println 'New tag for docker: ' + project.properties['project.docker.latesttag.version']; + + + + + + + io.fabric8 + docker-maven-plugin + 0.28.0 + + true + 1.23 + ${docker.pull.registry} + ${docker.push.registry} + + + + onap/policy-base-alpine + + try + Dockerfile + + ${project.version} + ${project.version}-${maven.build.timestamp} + ${project.docker.latesttag.version} + + + + + + + + + clean-images + pre-clean + + remove + + + true + + + + + generate-images + generate-sources + + build + + + + + push-images + deploy + + build + push + + + onap/policy-base-alpine + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + org.apache.maven.plugins + maven-install-plugin + + true + + + + + diff --git a/policy-base/alpine/src/main/docker/Dockerfile b/policy-base/alpine/src/main/docker/Dockerfile new file mode 100644 index 00000000..26f20f52 --- /dev/null +++ b/policy-base/alpine/src/main/docker/Dockerfile @@ -0,0 +1,23 @@ +# +# Docker file to build a base image for all policy apps images +# +# $JAVA_HOME is set to /usr/lib/jvm/java-1.8-openjdk +# more details at https://hub.docker.com/_/openjdk +# +FROM openjdk:8-alpine + +LABEL maintainer="Policy Team" + +# used in 7 out of 7 images +RUN apk add --no-cache \ + bash \ + coreutils \ + curl \ + findutils \ + grep \ + nss \ + openssh \ + procps \ + unzip \ + wget \ + zip diff --git a/policy-base/pom.xml b/policy-base/pom.xml new file mode 100644 index 00000000..4ec12073 --- /dev/null +++ b/policy-base/pom.xml @@ -0,0 +1,53 @@ + + + + 4.0.0 + + org.onap.policy.docker + docker + 2.1.0-SNAPSHOT + + + policy-base + pom + Policy Base Docker images + + + UTF-8 + UTF-8 + ${project.version} + false + false + false + nexus3.onap.org:10001 + nexus3.onap.org:10003 + yyyyMMdd'T'HHmm + + + + + docker + + alpine + + + + -- cgit 1.2.3-korg