...
Here are annotated contents of that file (master branch July 25, 2018, version 0.3.0-SNAPSHOT).
Executing this docker-compose.yml file will create and launch the containers. Navigate to <path>/ccsdk/distribution/src/main/yaml and enter the commands as in the sample terminal session below (the credentials to login to NEXUS_DOCKER_REPO are docker:docker). If you are executing this command for the first time, you will see output as the images are downloaded and extracted.
...
ODLSLI pom.xml initialization and dependencies
ODLSLI pom.xml: Preliminaries and setting the version value of the ODLSLI docker image
ODLSLI pom.xml: Prepare the directories and files for a 'docker build' command
...
The "docker" profile defines an additional 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."
The Docker fileDockerfile
Running the ODLSLI pom.xml file
...
Below is the annotated pom.xml file. It executes two maven phases: prepare-package and package. Maven executes the prepare-package phase before the package phase, although, in the pom.xml file, the prepare-package code appears after the prepare code. In the annotations, the sequence is indicated by number.
Building the docker image
By running the command 'mvn clean process-sources' and getting a BUILD SUCCESS, a properly constructed directory will have been created at ~/git/ccsdk/distribution/odlsli/target/docker-stage/.
Before building the image, remember that the Dockerfile begins with a local image: onap/ccsdk-odl-oxygen-image${project.version) (currently 0.3.0-SNAPSHOT). One can download the image from NEXUS_DOCKER_IMAGE and then rename it as a local image using the commands shown below.
Code Block | ||
---|---|---|
| ||
%: docker pull ${NEXUS_DOCKER_REPO}/onap/ccsdk-odl-oxygen-image:0.3.0-SNAPSHOT
0.3.0-SNAPSHOT: Pulling from onap/ccsdk-odl-oxygen-image
95871a411089: Pull complete
f7253e37cce8: Pull complete
12d05d7bd5c4: Pull complete
db27ec99c6c2: Pull complete
8fd62e3405ff: Pull complete
ce430a842b90: Pull complete
de7dcf5d4be1: Pull complete
e3de3d1054ec: Pull complete
d66bd2234856: Pull complete
6be70fc7e3a6: Pull complete
Digest: sha256:80da6c8e0f70d0dddd2be462634b297fc0dc5256cb93619b30a66441d1a89cb8
Status: Downloaded newer image for nexus3.onap.org:10001/onap/ccsdk-odl-oxygen-image:0.3.0-SNAPSHOT
%: docker tag ${NEXUS_DOCKER_REPO}/onap/ccsdk-odl-oxygen-image:0.3.0-SNAPSHOT onap/ccsdk-odl-oxygen-image:0.3.0-SNAPSHOT
%: docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
onap/ccsdk-odl-oxygen-image 0.3.0-SNAPSHOT bb02ebe49933 8 hours ago 1.72GB
nexus3.onap.org:10001/onap/ccsdk-odl-oxygen-image 0.3.0-SNAPSHOT bb02ebe49933 8 hours ago 1.72GB
nexus3.onap.org:10001/onap/ccsdk-dgbuilder-image 0.3-STAGING-latest eb208aa7f163 4 days ago 1.04GB
nexus3.onap.org:10001/onap/ccsdk-odlsli-image 0.3-STAGING-latest 665a42becd61 4 days ago 1.8GB
mysql/mysql-server 5.6 8d97ef4de156 3 months ago 226MB
|