ALERT This content may no longer be applicable.



It seems that for docker to work best, we need to do the following things:


Enable Buildkit

Enable Experimental Features 

  • Use the new Virtualization framework

After enabling this feature, reset your Kubernetes network.


Add Environment Variables

vi ~/.zshrc

export DOCKER_BUILDKIT=1
export DOCKER_DEFAULT_PLATFORM=linux/arm64


Docker Build Errors

"failed to solve with frontend dockerfile.v0"

Error:

 > [internal] load metadata for docker.io/ncyd/go-builder:latest:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

Solution

Execute the following and rebuild

export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0


Testing seems to suggest that setting DOCKER_BUILDKIT=0 is only required.

Add this export line to your ~/.zshrc file.


Building for ARM64

Specify platform of input image in Dockerfile

FROM --platform=linux/arm64 alpine:3.10
...




  • No labels