Skip to content

Instantly share code, notes, and snippets.

@jackinf
Last active January 6, 2019 17:42
Show Gist options
  • Save jackinf/144008cb55f251a4e63a6ba2e168310c to your computer and use it in GitHub Desktop.
Save jackinf/144008cb55f251a4e63a6ba2e168310c to your computer and use it in GitHub Desktop.
CircleCI simple configuration for building and pushing Docker image
# .circleci/config.yml should be in the root of the project
version: 2
general:
branches:
only:
- develop
- master
jobs:
build:
machine: true
steps:
- checkout
- run: docker login -u $DOCKER_USER -p $DOCKER_PASS
- run: docker build -t $IMAGE_TAG:$CIRCLE_BRANCH .
- run: docker push $IMAGE_TAG:$CIRCLE_BRANCH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment