Skip to content

Commit

Permalink
Pack docker errors out if a build step fails
Browse files Browse the repository at this point in the history
  • Loading branch information
parasj committed Apr 27, 2022
1 parent fc7d8cb commit bf1dacd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/pack_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ BGreen='\033[1;32m'
NC='\033[0m' # No Color

echo -e "${BGreen}Building docker image${NC}"
set -e
sudo DOCKER_BUILDKIT=1 docker build -t skylark .
set +e

DOCKER_URL="ghcr.io/skyplane-project/skyplane:local-$(openssl rand -hex 16)"
echo -e "${BGreen}Uploading docker image to $DOCKER_URL${NC}"
set -e
sudo docker tag skylark $DOCKER_URL
sudo docker push $DOCKER_URL
sudo docker system prune -f
set +e

export SKYLARK_DOCKER_IMAGE=$DOCKER_URL
echo -e "${BGreen}SKYLARK_DOCKER_IMAGE=$SKYLARK_DOCKER_IMAGE${NC}"

0 comments on commit bf1dacd

Please sign in to comment.