Skip to content

Instantly share code, notes, and snippets.

@dmjio
Forked from fizruk/docker-push.sh
Created November 10, 2015 17:22
Show Gist options
  • Save dmjio/6d056ea63269f3305cf8 to your computer and use it in GitHub Desktop.
Save dmjio/6d056ea63269f3305cf8 to your computer and use it in GitHub Desktop.
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