Skip to content

Commit

Permalink
Build docker image using CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
jsargiot committed Jul 7, 2023
1 parent 9289630 commit 3d58145
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: 2

jobs:
build-and-publish:
docker:
- image: cimg/python:3.10

steps:
- checkout

- setup_remote_docker:
docker_layer_caching: true

- run:
name: Publish Docker image
command: |
# Build image
docker build \
-t ${DOCKER_REPO}/spidyquotes/${CIRCLE_BRANCH,,}:${CIRCLE_SHA1:0:7} \
.
# Docker login
docker login \
-u ${DOCKER_USER} \
-p ${DOCKER_PASS} \
${DOCKER_REPO}
# Push image
docker push \
${DOCKER_REPO}/spidyquotes/${CIRCLE_BRANCH,,}:${CIRCLE_SHA1:0:7}
workflows:
version: 2
build-and-publish-workflow:
jobs:
- build-and-publish

0 comments on commit 3d58145

Please sign in to comment.