CI/CircleCI: Authenticate to DockerHub when pulling the docker image (#25581)

For more information see the following links:
- https://www.docker.com/blog/scaling-docker-to-serve-millions-more-developers-network-egress/
- https://docs.docker.com/docker-hub/download-rate-limit/
- https://circleci.com/docs/2.0/private-images/

Add DOCKERHUB_USERNAME and DOCKERHUB_PASSWORD secrets to CircleCI Environment Variables. DOCKERHUB_PASSWORD can be either the password or an access token.

(cherry picked from commit e3da1ed245)
This commit is contained in:
Giacomo Pozzoni
2020-10-17 14:24:54 +02:00
committed by funjoker
parent d4780e0b96
commit d10f844697

View File

@@ -3,7 +3,13 @@ jobs:
codestyle_and_sql:
docker:
- image: funjoker/circle-ci:4.3.4-buildpacks-focal
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
- image: circleci/mysql:8
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_ROOT_PASSWORD: ''
@@ -35,6 +41,9 @@ jobs:
pch:
docker:
- image: funjoker/circle-ci:4.3.4-buildpacks-focal
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
steps:
- run:
name: Checkout
@@ -80,6 +89,9 @@ jobs:
nopch:
docker:
- image: funjoker/circle-ci:4.3.4-buildpacks-focal
auth:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
steps:
- run:
name: Requirements