Skip to content

Instantly share code, notes, and snippets.

@caffeinetiger
Last active April 18, 2022 18:17
Show Gist options
  • Select an option

  • Save caffeinetiger/cdfc2f721c81d2cd46ad78cf13d08ea9 to your computer and use it in GitHub Desktop.

Select an option

Save caffeinetiger/cdfc2f721c81d2cd46ad78cf13d08ea9 to your computer and use it in GitHub Desktop.
To use this snippet you will enable the Docker buildx feature which is currently “experimental”. To do so, open up Docker Desktop then navigate to Preferences. Once you’re there, select “Experimental Features” and toggle the slider to on. Click on “A
#!/bin/bash
# List available platforms for building
docker buildx ls
# Create multiple builder instances to build multi-platform with build command
docker buildx create --use
docker buildx build --platform linux/amd64,linux/arm64 --push -t membermatters/membermatters .
# Build for single platform
docker buildx build --platform linux/amd64 --push -t membermatters/membermatters .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment