Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The "docker" profile defines an the additional "package" phase in which the docker image is built and deployed to NEXUS_DOCKER_REPO with the image name ${image.name}:${project.docker.latesttag.version}, which currently translates to "onap/ccsdk-odlsli-image:0.3-STAGING-latest."    I expect that the "docker build profile" in the pom.xml file requires special privileges because it deploys the image .  There is also a "deploy" phase in which the generated image is pushed to NEXUS_DOCKER_REPO, but this requires special privileges.  We discuss this section below.

Image Added

The Dockerfile

We have seen how the pom.xml file creates the ~/ccsdk/distribution/odlsli/target/docker-stage directory in preparation for building the docker image.  The next step is to inspect the Dockerfile that creates the image, discussed here.

Building the docker image

Using maven

One can create the image using the maven command "mvn --activate-profiles docker clean package" or equivalently "mvn -P docker clean package."  This generates these images:

Image Added

We see that a single image (all have the same IMAGE ID) is given four tags.

Using maven and 'docker build'

By running the command 'mvn clean process-sources' and getting a BUILD SUCCESS, a properly constructed directory will be created at ~/git/ccsdk/distribution/odlsli/target/docker-stage/.

...