Skip to content

Commit

Permalink
dist: docker build with temp namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiferson committed Aug 15, 2021
1 parent e0c5243 commit 0db52e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ for target in "linux/amd64" "linux/arm64" "darwin/amd64" "darwin/arm64" "freebsd
sudo rm -r $BUILD
done

docker buildx create --name nsq
docker buildx use nsq
rnd=$(LC_ALL=C tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c10)
docker buildx create --use --name nsq-$rnd
docker buildx build --tag nsqio/nsq:v$version . --platform linux/amd64,linux/arm64 --push
if [[ ! $version == *"-"* ]]; then
echo "Tagging nsqio/nsq:v$version as the latest release."
docker buildx build --tag nsqio/nsq:latest . --platform linux/amd64,linux/arm64 --push
fi
docker buildx rm nsq
docker buildx rm nsq-$rnd

0 comments on commit 0db52e6

Please sign in to comment.