From ebba8e3f60813167ecd134057428b0fd929899e9 Mon Sep 17 00:00:00 2001 From: asonix Date: Sun, 1 Aug 2021 15:14:44 -0500 Subject: [PATCH] Fix deploy script --- docker/prod/deploy.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/prod/deploy.sh b/docker/prod/deploy.sh index 2d4fc71..ea01e18 100755 --- a/docker/prod/deploy.sh +++ b/docker/prod/deploy.sh @@ -25,7 +25,7 @@ function build_image() { tag=$2 arch=$3 - docker build \ + sudo docker build \ --pull \ --build-arg TAG="${tag}" \ -f "Dockerfile.${arch}" \ @@ -33,14 +33,14 @@ function build_image() { -t "${repo}:latest-${arch}" \ . - docker push "${repo}:${tag}-${arch}" - docker push "${repo}:latest-${arch}" + sudo docker push "${repo}:${tag}-${arch}" + sudo docker push "${repo}:latest-${arch}" } require "$TAG" "tag" -if ! docker run --rm -it arm64v8/ubuntu:19.10 /bin/bash -c 'echo "docker is configured correctly"'; then - echo "docker is not configured to run on qemu-emulated architectures, fixing will require sudo" +if ! sudo docker run --rm -it arm64v8/ubuntu:19.10 /bin/bash -c 'echo "docker is configured correctly"'; then + echo "docker is not configured to run on qemu-emulated architectures" sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes fi