Skip to content

Instantly share code, notes, and snippets.

@pando85

pando85/docker_arm.md

Last active Jan 16, 2020
Embed
What would you like to do?
Docker arm images

Docker in ARM

Buildx

docker buildx build --platform linux/amd64,linux/arm64 \
    -t registry.k8s.grigri/pypiserver:v1.3.2 -f Dockerfile  --output type=registry .

Private registry with own certificate workaround:

BUILDER=$(sudo docker ps | grep buildkitd | cut -f1 -d' ')
sudo docker cp /etc/ca-certificates/trust-source/anchors/grigri.crt $BUILDER:/usr/local/share/ca-certificates/
sudo docker exec $BUILDER update-ca-certificates
sudo docker restart $BUILDER

Build

requirements

  • qemu-user-static package installed.
  • {"experimental": true} in /etc/docker/daemon.json

Dockerfile

Use arm wanted architecture. Python example:

FROM arm64v8/python:3

Build image

Build with --platform flag. Example:

docker build --platform arm64 . -t test-image:arm64v8-latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.