Skip to content

Instantly share code, notes, and snippets.

@hohonuuli
Last active March 16, 2022 19:35
Show Gist options
  • Save hohonuuli/f94942e280819095ef1eeae2460fe097 to your computer and use it in GitHub Desktop.
Save hohonuuli/f94942e280819095ef1eeae2460fe097 to your computer and use it in GitHub Desktop.
Example build script for docker containers on M1/Arm
#!/usr/bin/env bash
echo "--- Building vars-kb-server (reminder: run docker login first!!)"
VCS_REF=`git tag | sort -V | tail -1`
docker buildx build --platform linux/amd64,linux/arm64 \
-t mbari/vars-kb-server:${VCS_REF} \
-t mbari/vars-kb-server:latest \
--push . \
&& docker pull mbari/vars-kb-server:latest
@hohonuuli
Copy link
Author

hohonuuli commented Mar 2, 2022

If you're just testing locally, you can run this instead:

docker buildx build \
        --platform linux/arm64 \
        --load \
        -t mbari/vars-kb-server:latest .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment