Browse Source

Add option to publish to non DockerHub registry

pull/208/head
Clemens Wolff 5 years ago
parent
commit
a6e0ddd959
1 changed files with 7 additions and 2 deletions
  1. 9
      tools/cd.sh

9
tools/cd.sh

@ -6,10 +6,15 @@ if [[ -z "$1" ]]; then echo "Usage: $0 <tag>" >&2; exit 1; fi
set -o errexit
if [[ -z "${DOCKER_REGISTRY}" ]]; then
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
else
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin "${DOCKER_REGISTRY}"
DOCKER_USERNAME="${DOCKER_REGISTRY}"
fi
docker build -t "${DOCKER_USERNAME}/doccano:latest" .
docker build -t "${DOCKER_USERNAME}/doccano:$1" .
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
docker push "${DOCKER_USERNAME}/doccano:latest"
docker push "${DOCKER_USERNAME}/doccano:$1"
Loading…
Cancel
Save