Skip to content

Instantly share code, notes, and snippets.

@usrbinkat
Created February 11, 2025 18:32
Show Gist options
  • Save usrbinkat/5ba6021454aea9b544ed2547ce8dbaed to your computer and use it in GitHub Desktop.
Save usrbinkat/5ba6021454aea9b544ed2547ce8dbaed to your computer and use it in GitHub Desktop.
Manually Build & Publish multi-arch ghcr.io Containers in Github Codespaces

Install Packages

sudo apt-get update
sudo apt-get install -y qemu-user-static

Create a new builder instance and use it

docker buildx create --use --name mybuilder
docker buildx inspect mybuilder --bootstrap

Login to GitHub Container Registry

echo $GITHUB_TOKEN | docker login ghcr.io -u $GITHUB_USER --password-stdin

Build and push the multi-arch image

docker buildx build --platform linux/amd64,linux/arm64 --progress plain --tag ghcr.io/containercraft/devcontainer:nvim -f ./docker/neovim/Dockerfile --push ./docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment