From 2f6cb9d7191f25676ff87150cafba675d3ec2de9 Mon Sep 17 00:00:00 2001 From: Eelco Date: Mon, 10 Dec 2018 16:45:01 +0100 Subject: [PATCH] feat: Allows pushing to private registry (#893) using the goreleaser docker container --- scripts/entrypoint.sh | 2 +- www/content/install.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index f6104a525..ba81cc267 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -2,7 +2,7 @@ if [ -n "$DOCKER_USERNAME" ] && [ -n "$DOCKER_PASSWORD" ]; then echo "Login to the docker..." - docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY fi goreleaser $@ diff --git a/www/content/install.md b/www/content/install.md index e32c36574..feca0112d 100644 --- a/www/content/install.md +++ b/www/content/install.md @@ -56,11 +56,15 @@ $ docker run --rm --privileged \ -e GITHUB_TOKEN \ -e DOCKER_USERNAME \ -e DOCKER_PASSWORD \ + -e DOCKER_REGISTRY \ goreleaser/goreleaser release ``` Note that the image will almost always have the last stable Go version. +The `DOCKER_REGISTRY` environment variables can be left empty when you are +releasing to the public docker registry. + If you need more things, you are encouraged to have your own image. You can always use GoReleaser's [own Dockerfile][dockerfile] as an example though.