Build and share Docker images using AWS CodeBuild
Introduction
Build Docker images using AWS CodeBuild
Run Docker images from Docker Hub and AWS Elastic Container Registry (ECR)
Next Steps
Build and share Docker images using AWS CodeBuild
Who is this for?
This is an advanced topic for software developers interested in using AWS CodeBuild to automate container build tasks.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Use a GitHub project and AWS CodeBuild to automate Docker image creation
- Pull and run the created Docker images on any Arm computer with Docker installed
Prerequisites
Before starting, you will need the following:
- An AWS account for accessing AWS cloud services.
- An Arm based instance from a cloud service provider or any Arm server, laptop, or single-board computer running Docker used to run the created images
Summary
This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
You’ll use AWS CodeBuild and a GitHub repository to build AArch64 Docker images on AWS Graviton. You’ll publish the images to Docker Hub and Amazon ECR Public Gallery, then pull and run them on an Arm Linux machine with Docker. Finally, you’ll verify the architecture with
uname -m and compare the images from both registries.Frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Run
uname -m on the target Linux system. The expected output is aarch64. If you see a different value, you’re not on a 64-bit Arm machine.When the CodeBuild project completes successfully, you can pull the images from Docker Hub or Amazon ECR Public Gallery and run them on an Arm machine with Docker.
Both registries provide the same images. Choose Docker Hub or Amazon ECR Public Gallery based on which registry fits your environment.
Running
uname -m inside the container should return aarch64, and the output should match regardless of which registry you used. The example also shows that CodeBuild built the image on Amazon Linux 2.Yes. Select an Arm-based environment in CodeBuild to build AArch64 Docker images from a GitHub-hosted project.