Skip to content

Add support for private container registries #62

@mwiens

Description

@mwiens

Problem

konlet currently does not support starting images from private registries that need authentication (username and token).

When providing in gce-container-declaration metadata the following

"image": "registry.gitlab.mysite.com/my-project/my-software-container:latest"

to run my container on the GCE with COS, I get following message (from sudo journalctl -u konlet-startup):

May 14 15:40:38 test-vm konlet-startup[35691]: 2020/05/14 15:40:38 Error: Failed to start container:Error response from daemon: {"message":"Get https://registry.gitlab.mysite.com/my-project/my-software-container/manifests/latest: denied: access forbidden"}

But the same script works with "image": "busybox".

Proposal

Add additional parameters like registry-auth-user, registry-auth-token and maybe registry-auth-url. When the used registry is not one from GCP, perform echo -n registry-auth-token | docker login -u registry-auth-user --password-stdin registry-auth-url or similar, so the corresponding container can be pulled.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions