Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Commit

Permalink
Authenticate to DockerHub when building canary image
Browse files Browse the repository at this point in the history
So we don't get caught in rate limiting issues when trying to pull a FROM image

Based on this hack courtesy of Andy Paine: concourse/oci-build-task#14 (comment)
  • Loading branch information
Krenair committed Nov 23, 2020
1 parent 3702b1f commit 3e17196
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,21 @@ spec:
repository: vito/oci-build-task
username: ((dockerhubpull-concourse.username))
password: ((dockerhubpull-concourse.password))
params:
CONTEXT: src/components/canary
inputs:
- name: src
outputs:
- name: image
run:
path: build
path: ash
args:
- -c
- |
AUTH="$(echo -n '((dockerhubpull-concourse.username)):((dockerhubpull-concourse.password))' | base64)"
mkdir docker_creds
cat > docker_creds/config.json <<EOF
{ "auths": { "https://index.docker.io/v1/": { "auth": "$AUTH" }}}
EOF
CONTEXT=src/components/canary DOCKER_CONFIG=docker_creds build
- put: ecr
params:
image: image/image.tar
Expand Down

0 comments on commit 3e17196

Please sign in to comment.