Skip to content

Instantly share code, notes, and snippets.

@qdm12
Last active December 1, 2019 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qdm12/e97f2a7cfd266024571ac2d1ce0c8580 to your computer and use it in GitHub Desktop.
Save qdm12/e97f2a7cfd266024571ac2d1ce0c8580 to your computer and use it in GitHub Desktop.
Travis CI script for multi arch builds
#!/bin/bash
if [ "$TRAVIS_PULL_REQUEST" = "true" ] || [ "$TRAVIS_BRANCH" != "master" ]; then
docker buildx build \
--progress plain \
--platform=linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/s390x \
.
exit $?
fi
echo $DOCKER_PASSWORD | docker login -u qmcgaw --password-stdin &> /dev/null
TAG="${TRAVIS_TAG:-latest}"
docker buildx build \
--progress plain \
--platform=linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/s390x \
-t $DOCKER_REPO:$TAG \
--push \
.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment