Skip to content

Draft: Multi-Architecture CentOS 7 Base Image, master branch (2023.02.08.)

In an effort to better support the various aarch64 nightlies, this MR is an attempt to make atlas/centos7-atlasos "multi-platform". At the same time I want to use this MR as a way of documenting what I did with all of this so far.

Much of what I did is based on these 2 "things":

Using all the updates of this MR, I built the very latest version (at least at the time of writing) of krasznaa/centos7-atlasos:testing with:

Screenshot_2023-02-08_at_6.17.18_PM

  • I prepared a "buildx environment" in my terminal with (this was particularly painful to figure out...):
docker buildx create --name ATLASBuilder
docker buildx use ATLASBuilder
docker buildx inspect --bootstrap
  • I then built and uploaded the multi-architecture image with:
docker buildx build --push --platform linux/amd64,linux/arm64/v8 --tag krasznaa/centos7-atlasos:testing --compress --squash ./docker/centos7-atlasos/

It's also possible to follow the "more complicated" recipe from my first link, but that unfortunately forces you into first uploading single-architecture images into DockerHub before you could combine them into a single multi-architecture one. (I was very surprised/disappointed about this.) The recipe for doing that was the following:

docker build --platform linux/amd64 -t krasznaa/centos7-atlasos:testing-amd64 --compress --squash ./docker/centos7-atlasos/
docker push krasznaa/centos7-atlasos:testing-amd64

docker build --platform linux/arm64/v8 -t krasznaa/centos7-atlasos:testing-arm64 --compress --squash ./docker/centos7-atlasos/
docker push krasznaa/centos7-atlasos:testing-arm64

docker manifest create krasznaa/centos7-atlasos:testing --amend krasznaa/centos7-atlasos:testing-amd64 --amend krasznaa/centos7-atlasos:testing-arm64
docker manifest push krasznaa/centos7-atlasos:testing

Now... I still don't know what's the way to do this properly. I basically don't like either of these methods. 😦 So I wonder if we should just stick to single-architecture tags for now. 🤔 Especially because docker build directly seems to produce smaller compressed images. 😕 But I yet have to investigate that further...

Pinging @elmsheus.

Merge request reports