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

Wrong version using component install of Cloud sdk #90

Open
Pfriasf opened this issue Jul 5, 2021 · 2 comments
Open

Wrong version using component install of Cloud sdk #90

Pfriasf opened this issue Jul 5, 2021 · 2 comments

Comments

@Pfriasf
Copy link

Pfriasf commented Jul 5, 2021

I am trying to create my own image to use inside "Container optimized OS".

FROM google/cloud-sdk:alpine as builder1

RUN gcloud components install docker-credential-gcr --quiet
RUN gcloud components update
RUN docker-credential-gcr version





FROM docker/compose

COPY --from=builder1 /google-cloud-sdk/bin/* /usr/local/bin/
RUN docker-credential-gcr configure-docker
CMD docker-compose

I run into the problem that it always installs version 1.5.0 which does not let me add records for artifact registries.

Any idea how to install the correct version of docker-credential-gcr?

thanks in advance

@GoogleContainerRegistry
Copy link
Collaborator

GoogleContainerRegistry commented Jul 7, 2021 via email

@jonjohnsonjr
Copy link
Contributor

My recollection might be fuzzy here, but I believe we originally distributed docker-credential-gcr through gcloud prior to the docker-credential-gcloud credential helper's existence. Given that you can just use gcloud for this, installing docker-credential-gcr through gcloud doesn't make as much sense.

You should be able to achieve the same thing with gcloud auth configure-docker:

$ gcloud auth configure-docker --help

NAME
    gcloud auth configure-docker - register gcloud as a Docker credential
        helper

SYNOPSIS
    gcloud auth configure-docker [REGISTRIES] [GCLOUD_WIDE_FLAG ...]

DESCRIPTION
    gcloud auth configure-docker adds the Docker credHelper entry to Docker's
    configuration file, or creates the file if it doesn't exist. This will
    register gcloud as the credential helper for all Google-supported Docker
    registries. If the Docker configuration already contains a credHelper
    entry, it will be overwritten.

    Note, docker and gcloud need to be on the same system PATH to work
    correctly.

    For more details on Docker credential helpers, see
    https://docs.docker.com/engine/reference/commandline/login/#credential-helpers.

    For more details on the Google Container Registry's Docker credential
    helper, see https://github.com/GoogleCloudPlatform/docker-credential-gcr.

POSITIONAL ARGUMENTS
     [REGISTRIES]
        The comma-separated list of registries to configure the credential
        helper for.

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

3 participants