Skip to content

Conversation

@richtong
Copy link

This extends the current docker build to use Buildx for multiple
architectures and also expands so that the images can be pushed to arbitrary
registries. There is also technical checks because multiarch requires at least
32GB of memory to build two images. Also instead of setting the number of jobs
to 14 and then moving it down, it sets it to half the number of processors.
The current C compiler will crash if there is not enough memory and there is
now a way to monitor this with make statc

  • fix, feat: docker buildx on Mac, adding auto docker build
  • fix: readme.md ``` to ` change to vis4rob
  • fix: docker makefile push or load and NR_JOBS set

Adds apt-get unzip so the Dockerfile will build properly.
Works for M1 builds of AMD64 images
Converts to using buildx
docker now does multiarchitecture containers and github actions will
automatically build these on pushes
Getting the right variable names for docker buildx action
qemu action name has changed
semvar not recognized changing the types
automatic tagging for dockerfile
The correct format is not 0.0.1 but v0.0.1
git semvar needs env.IMAGE_REPOSITORY to work
Also correct qemu location, add image on tags
metadata-action does not take register in image
dockerfile in ./docker
fix for local test
add build-arg to test build
Makefile adds stats for container monitor at 16GB limit
Makefile now pushes optionally with PUSH=true or PUSH=1 and moved
documentation on build issues to README.md

Warning automatically checks for how much memory is available to docker
with docker info and looks for 7GB as a minimum and 32GB for multiarch.
It actually is just for dual arch, not clear what more than that needs

Notes that the container gets rebuilt even for trivial changes

Now build will not --push by default it will just --load locally a
single architecture image.

Make buildx uses BuildKit and enables the PLATFORM= so you can build
multiple. Note that only --push is allowed since currently the local
docker daemon cannot handle multiarch manifest files.

Build need a .dockerignore in the build context while buildx can use a
Dockerfile.dockerignore in the directory where Dockerfile lives

Adding NR_JOBS at half processors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant