Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Push to Docker from Circle CI
#!/bin/sh
set -x
CIRCLE_TAG=`git name-rev --tags --name-only $(git rev-parse HEAD)`
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
if [ "$CIRCLE_TAG" -ne "undefined" ]; then
docker tag user/repo user/repo:$CIRCLE_TAG
fi
docker tag user/repo user/repo:$CIRCLE_BRANCH
docker push user/repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment