From 1bfb6911d281185913323f64827834b5108397ee Mon Sep 17 00:00:00 2001 From: Meezaan-ud-Din Abdu Dhil-Jalali Wal-Ikram Date: Mon, 29 Apr 2019 08:09:48 +0100 Subject: [PATCH] Mirror with Docker Hub --- .circleci/config.yml | 19 +++++++++++++++++-- README.md | 4 +++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a3d5c06..d063250 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,6 +3,7 @@ executors: docker-publisher: environment: IMAGE_NAME: quay.io/islamic-network/api.alquran.cloud + IMAGE_NAME_DH: islamicnetwork/api.alquran.cloud docker: - image: circleci/buildpack-deps:stretch php72: @@ -70,11 +71,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: @@ -85,12 +93,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 diff --git a/README.md b/README.md index dce45af..07f0d3e 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,9 @@ This repository powers the AlQuran.cloud API on http://api.alquran.cloud. The api and all its dependencies are fully Dockerised. You **just need docker and docker-compose** to spin everything up. -A production ready Docker image of the api is published as quay.io/islamic-network/api.alquran.cloud on Quay.io. +A production ready Docker image of the api is published as: +* quay.io/islamic-network/api.alquran.cloud on Quay +* islamicnetwork/api.alquran.cloud on Docker Hub To get your own instance up, simply run: