Skip to content

Commit e797848

Browse files
authored
Merge pull request #715 from vnghia/multiarch
Enable multiarch image
2 parents 30c0d61 + bbc50d5 commit e797848

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ before_install:
3131
- sudo apt-get -y install python3-pip python3-setuptools apache2-utils python3-venv
3232
- wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/116.0.5845.96/linux64/chromedriver-linux64.zip
3333
- unzip chromedriver-linux64.zip -d $HOME/.local/bin
34+
- mkdir -vp ~/.docker/cli-plugins/
35+
- curl --silent -L "https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
36+
- chmod a+x ~/.docker/cli-plugins/docker-buildx
3437
install:
3538
- pip3 install -r requirements.txt
3639
- pip3 install pyasn1 --upgrade

tools/deploy_docker.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,15 @@ else
1919
DOCKER_TAG="$TRAVIS_BRANCH"
2020
fi
2121

22+
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
23+
2224
docker login -u "$DOCKER_USER" -p "$DOCKER_PASSWORD"
2325

24-
docker build -f tools/Dockerfile -t "$IMAGE_NAME":"$DOCKER_TAG" .
26+
docker buildx create --use
27+
docker buildx build --platform linux/amd64,linux/arm64 --push -f tools/Dockerfile -t "$IMAGE_NAME":"$DOCKER_TAG" .
2528

2629
echo "NEW_GIT_TAG=$NEW_GIT_TAG"
2730
if [ ! -z "$NEW_GIT_TAG" ]; then
2831
docker tag "$IMAGE_NAME":"$DOCKER_TAG" "$IMAGE_NAME":"$NEW_GIT_TAG"
32+
docker push "$IMAGE_NAME":"$NEW_GIT_TAG"
2933
fi
30-
31-
docker push --all-tags "$IMAGE_NAME"

0 commit comments

Comments
 (0)