Skip to content

Commit

Permalink
Add Docker Hub mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram committed Apr 29, 2019
1 parent d300e56 commit c53886e
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ executors:
docker-publisher:
environment:
IMAGE_NAME: quay.io/islamic-network/cdn.aladhan.com
IMAGE_NAME_DH: islamicnetwork/cdn.aladhan.com
docker:
- image: circleci/buildpack-deps:stretch
apache2:
Expand Down Expand Up @@ -59,11 +60,18 @@ jobs:
name: Load archived Docker image
command: docker load -i /tmp/workspace/prod.tar
- run:
name: Publish Docker Image to Docker Hub
name: Publish Docker Image to QUAY.IO
command: |
echo "$QUAYIO_PASSWORD" | docker login quay.io -u "$QUAYIO_USERNAME" --password-stdin
IMAGE_TAG="${CIRCLE_BUILD_NUM}"
docker push $IMAGE_NAME:latest
- run:
name: Publish Docker Image to Docker Hub
command: |
echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
IMAGE_TAG="${CIRCLE_BUILD_NUM}"
docker tag $IMAGE_NAME:latest $IMAGE_NAME_DH:latest
docker push $IMAGE_NAME_DH:latest
publish-docker-tag:
executor: docker-publisher
steps:
Expand All @@ -74,12 +82,19 @@ jobs:
name: Load archived Docker image
command: docker load -i /tmp/workspace/prod.tar
- run:
name: Publish Docker Image to Docker Hub
name: Publish Docker Image to QUAY.IO
command: |
echo "$QUAYIO_PASSWORD" | docker login quay.io -u "$QUAYIO_USERNAME" --password-stdin
IMAGE_TAG=${CIRCLE_TAG}
docker tag $IMAGE_NAME:latest $IMAGE_NAME:$IMAGE_TAG
docker push $IMAGE_NAME:$IMAGE_TAG
- run:
name: Publish Docker Image to Docker Hub
command: |
echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
IMAGE_TAG=${CIRCLE_TAG}
docker tag $IMAGE_NAME:latest $IMAGE_NAME_DH:$IMAGE_TAG
docker push $IMAGE_NAME_DH:$IMAGE_TAG
workflows:
version: 2
Expand Down

0 comments on commit c53886e

Please sign in to comment.