Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pack build fails to pull image when docker is configured to use gcr credential helper #74

Closed
jldec opened this issue Nov 25, 2018 · 2 comments
Assignees

Comments

@jldec
Copy link

jldec commented Nov 25, 2018

Using own build of pack cli from master branch
(git sha: 1974ced)

I can successfully build using builder from public repo on dockerhub
e.g. pack build jldec/java-hello:v1 --builder projectriff/builder --path .

But substituting for a builder which requires a gcr credential helper fails, even though docker pull of the same image succeeds.

$ echo $PFS_BUILDER_IMAGE
gcr.io/cf-spring-pfs-release/projectriff-builder-a527160a809f5f8d339af74b304e6c46:0.0.1-snapshot-ci-31a4547a8f07

$ pack build jldec/java-hello:vp1 --builder $PFS_BUILDER_IMAGE --path . 
2018/11/25 17:33:50 Using user provided builder image 'gcr.io/cf-spring-pfs-release/projectriff-builder-a527160a809f5f8d339af74b304e6c46:0.0.1-snapshot-ci-31a4547a8f07'
2018/11/25 17:33:50 Pulling builder image 'gcr.io/cf-spring-pfs-release/projectriff-builder-a527160a809f5f8d339af74b304e6c46:0.0.1-snapshot-ci-31a4547a8f07' (use --no-pull flag to skip this step)
Error: Error response from daemon: unauthorized: You don't have the needed permissions to perform this operation, and you may have invalid credentials. To authenticate your request, follow the steps in: https://cloud.google.com/container-registry/docs/advanced-authentication

$ docker pull $PFS_BUILDER_IMAGE
0.0.1-snapshot-ci-31a4547a8f07: Pulling from cf-spring-pfs-release/projectriff-builder-a527160a809f5f8d339af74b304e6c46
Digest: sha256:03082ad86323f70a699c784ce8dc5afd9bc9554ba500f126bd7d8daee09a8eb5
Status: Image is up to date for gcr.io/cf-spring-pfs-release/projectriff-builder-a527160a809f5f8d339af74b304e6c46:0.0.1-snapshot-ci-31a4547a8f07

NOTE: I'm using the "standalone" gcr credential helper described here.

gcloud components install docker-credential-gcr
docker-credential-gcr configure-docker

cc @scothis

@ekcasey
Copy link
Member

ekcasey commented Dec 14, 2018

reopening until we release pack@v0.0.9 with the fix

@ekcasey ekcasey reopened this Dec 14, 2018
@ekcasey ekcasey moved this from Done to Release 9 in Planning Board Dec 14, 2018
@ekcasey ekcasey moved this from Release 9 to Done in Planning Board Dec 14, 2018
matthewmcnew added a commit that referenced this issue Dec 14, 2018
[#74]

Signed-off-by: Matthew McNew <mmcnew@pivotal.io>
Signed-off-by: Emily Casey <ecasey@pivotal.io>
@shanks3012 shanks3012 moved this from Done to Release 9 in Planning Board Dec 19, 2018
@ekcasey
Copy link
Member

ekcasey commented Jan 9, 2019

released in pack@v0.0.9

@ekcasey ekcasey closed this as completed Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants