Versions Compared

Key

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

...

In general, the process to build a multi-cpu architecture container image follows the flow depicted on the following figure.

The commands to needed to implement the flow are described, using an example, in the next section.

...

Following are the commands you need needed to create a multi-cpu architecture container image. Let's call the image onap/multi-cpu-app-py

...

Note that this flow can be used during the ONAP development-test-debug process. For the release process, the flow is implemented using CI/CD pipelines as shown in the next section.

Build arm image (A)

Assuming you have compiled the arm executable for the application, then execute

Code Block
docker build -t onap/app-py-arm-linux .

Push arm image to the registry

Code Block
docker push onap/app-py-arm-linux:latest

Once the image has been successfully built, push it to the repository.

Note that if you are using a private repository, you might need to "docker tag" the image before executing the next command.

Code Block
docker push onap/app-py-arm-linux:latest

Build Intel image (B)

Let's now repeat the process for the intel layers of the multi-cpu container image.

Code Block
docker build -t onap/app-py-amd-linux .

...

Code Block
docker push onap/app-py-amd-linux:latest

...

:latest

Create a manifest list for image A and image B

Now that we have built and pushed layers for each cpu architecture, we can create the manifest list to put the final container image together with

Code Block
docker manifest create onap/multi-cpu-app-py \ 
                       onap/app-py-arm-linux \ 
                       onap/app-py-amd-linux 

...


Verify that the manifest describes a multi-cpu architecture

...

container image.


Code Block
docker manifest inspect --verbose onap/multi-cpu-app-py


Verify that the manifest actually represents a multi-cpu architecture by looking at the different "platform" entries.

Notice how, in this case, Notice how the the manifest shows layers for both arm and Intel cpu architectures.

...