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

Commit

Permalink
Merge pull request #1210 from alphagov/build-canary-auth
Browse files Browse the repository at this point in the history
Authenticate to DockerHub when building canary image
  • Loading branch information
Krenair authored Nov 23, 2020
2 parents 3702b1f + 3e17196 commit 6617709
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 6617709

Please sign in to comment.