From ea7e3bec7aa40a41d1c3b91193a41058f40e915a Mon Sep 17 00:00:00 2001 From: crisannneo Date: Fri, 8 Mar 2019 15:42:59 +0800 Subject: [PATCH 1/3] push to Docker hub from circleCI --- .circleci/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2440b829..652868cb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,3 +17,11 @@ jobs: command: | docker-compose up -d docker-compose run dockerapp python test.py + - deploy: + name: Push application Docker image + command: | + docker login -e $DOCKER_HUB_EMAIL -u $DOCKER_HUB_USER_ID -p $DOCKER_HUB_PWD + docker tag dockerapp_dockerapp $DOCKER_HUB_USER_ID/dockerapp:$CIRCLE_SHA1 + docker tag dockerapp_dockerapp $DOCKER_HUB_USER_ID/dockerapp:latest + docker push $DOCKER_HUB_USER_ID/dockerapp:$CIRCLE_SHA1 + docker push $DOCKER_HUB_USER_ID/dockerapp:latest From 0c094bad4f223fce346b56c8f57e528cd8dde523 Mon Sep 17 00:00:00 2001 From: crisannneo Date: Fri, 8 Mar 2019 16:09:28 +0800 Subject: [PATCH 2/3] push to Docker --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 652868cb..09835682 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: - deploy: name: Push application Docker image command: | - docker login -e $DOCKER_HUB_EMAIL -u $DOCKER_HUB_USER_ID -p $DOCKER_HUB_PWD + docker login -u $DOCKER_HUB_USER_ID -p $DOCKER_HUB_PWD docker tag dockerapp_dockerapp $DOCKER_HUB_USER_ID/dockerapp:$CIRCLE_SHA1 docker tag dockerapp_dockerapp $DOCKER_HUB_USER_ID/dockerapp:latest docker push $DOCKER_HUB_USER_ID/dockerapp:$CIRCLE_SHA1 From e5824fac721e4b0f9fe53e794ebf73ebcfcb25d0 Mon Sep 17 00:00:00 2001 From: crisannneo <48339926+crisannneo@users.noreply.github.com> Date: Fri, 8 Mar 2019 17:15:51 +0800 Subject: [PATCH 3/3] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b3f88bf6..e4df3215 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: - deploy: name: Push application Docker image command: | - docker login -e $DOCKER_HUB_EMAIL -u $DOCKER_HUB_USER_ID -p $DOCKER_HUB_PWD + docker login -u $DOCKER_HUB_USER_ID -p $DOCKER_HUB_PWD docker tag dockerapp_dockerapp $DOCKER_HUB_USER_ID/dockerapp:$CIRCLE_SHA1 docker tag dockerapp_dockerapp $DOCKER_HUB_USER_ID/dockerapp:latest docker push $DOCKER_HUB_USER_ID/dockerapp:$CIRCLE_SHA1