Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- set -o errexit
- DOCKER_USERNAME=$1
- DOCKER_PASSWORD=$2
- DOCKER_TAG_LOCAL=$3
- DOCKER_CONTAINER_NAME=$4
- VERSION=$5
- # login dockerhub
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- # change the local tag name to the target name on dockerhub
- docker tag $DOCKER_TAG_LOCAL $DOCKER_USERNAME/$DOCKER_CONTAINER_NAME:$VERSION
- # push the container
- docker push $DOCKER_USERNAME/$DOCKER_CONTAINER_NAME:$VERSION
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement