Use Docker containers on ARM architecture
Codefresh is offering initial support for building Docker images for the ARM architecture. ARM support is only available to Enterprise customers.
Enabling ARM support
Once approved, your build environment will move to an ARM cluster, and therefore all your builds will be ARM enabled. This means that if you also want to keep using the normal Linux/x86 builds, it is best to create a second Codefresh account just for trying ARM support.
Using ARM builders in Codefresh
Once ARM support is enabled for your account, there is no other special requirement to start building ARM images.
Just read the normal Codefresh documentation:
- Introduction to Pipelines
- Creating a pipeline
- Codefresh YAML
- Codefresh Registry
- On demand environments
The only important thing to notice is to make sure that the base Docker images you use are ARM-compiled.
Most popular Docker images (e.g. Alpine) already offer ARM support so all your builds should work right away.
Dockerhub has a lot of public images that are offered in multiple architectures. You will get errors only if you use a less popular image that has no ARM support.
Example for an ARM build
Create a pipeline for it with the following YAML content:
This pipeline creates a Docker image for a python application and then runs unit tests inside it.
It contains two steps:
- A build step that reads a Dockerfile and creates a Docker image.
- A freestyle step that runs unit tests.
The logs verify that this is an ARM image:
Once the pipeline is finished you will see the Docker image stored in the Codefresh Registry:
You can also launch it as a demo environment
In summary, the workflow for ARM images is exactly the same as the usual Linux/x86 images.