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

Docker Error #1

Closed
jamesward opened this issue Jul 10, 2019 · 7 comments
Closed

Docker Error #1

jamesward opened this issue Jul 10, 2019 · 7 comments

Comments

@jamesward
Copy link
Contributor

I'm getting an error trying to build the container:

Status: Downloaded newer image for golang:latest
 ---> f50db16df5da
Step 2/8 : WORKDIR /go/src/cloudrun/hello
 ---> Running in ab656f83f629
Removing intermediate container ab656f83f629
 ---> 1c24f8f8b0ae
Step 3/8 : COPY . .
 ---> bc287b53a41a
Step 4/8 : RUN CGO_ENABLED=0 GOOS=linux go build -v -o hello
 ---> Running in 59ed5289c668
net
crypto/x509
crypto/tls
net/textproto
internal/x/net/http/httpguts
internal/x/net/http/httpproxy
net/http/httptrace
net/http
cloudrun/hello
Removing intermediate container 59ed5289c668
 ---> 11d2c8ad490f
Step 5/8 : FROM marketplace.gcr.io/google/ubuntu1804:latest
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
@jamesward
Copy link
Contributor Author

Should we use distroless instead?

@ahmetb
Copy link
Contributor

ahmetb commented Jul 10, 2019

I was able to build just fine and GCB builds just fine too. Likely a setup issue on your side somehow. If you click on the image, it should be public.
The point of the image is to be extensible easily, distroless defeats that purpose I think.

@jamesward
Copy link
Contributor Author

Can you try on a fresh / demo account?

@jamesward
Copy link
Contributor Author

I switched the FROM marketplace.gcr.io/google/ubuntu1804:latest to FROM alpine and it worked. So there is something funky with using marketplace.gcr.io

@ahmetb
Copy link
Contributor

ahmetb commented Jul 10, 2019

You are, indeed, correct.

Easy repro on desktop:

rm ~/.docker/config.json
docker pull marketplace.gcr.io/google/ubuntu1804:latest

Looks like the gcloud auth configure-docker -q actually provisions this file, that has marketplace.gcr.io in it.

{
  "credHelpers" : {
    "us.gcr.io" : "gcloud",
    "asia.gcr.io" : "gcloud",
    "marketplace.gcr.io" : "gcloud",
    "staging-k8s.gcr.io" : "gcloud",
    "gcr.io" : "gcloud",
    "eu.gcr.io" : "gcloud"
  },
  "stackOrchestrator" : "swarm"
}

I'll start an internal thread to discuss making the images public.

The redirected image gcr.io/cloud-marketplace/google/ubuntu1804@sha256:7832d9f0553c170ee2b5e3376c11f37ddfa3e425e303ad31e0810f5f3531bf8a isn't public, either.

@jamesward
Copy link
Contributor Author

Thanks for investigating further!

@jamesward
Copy link
Contributor Author

This is now fixed!

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