devcontainers / devcontainers/features

Docker-in-docker: Can`t docker login

Offen
#453 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
duplicate
Vorherrschende Sprache
Shell
Sterne
1.5k
Forks
621
Ø Merge
6 T. 53 Min.
Gemergte PRs (30 T.)
9

Beschreibung

In a docker container with ghcr.io/devcontainers/features/docker-in-docker:2, I can't do a `docker login`. This is what I get:
`vscode ➜ /workspaces/teste $ docker login
Authenticating with existing credentials...
Error saving credentials: error storing credentials - err: exit status 1, out: 'Docker credential command not supported without credential helper: store.'`

This is my devcontainer.json:

`// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-in-docker
{
"name": "Docker in Docker",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:bullseye",

"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest",
"enableNonRootDocker": "true",
"moby": "true"
}
}

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "docker --version",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}`

No Dockerfile nor docker-compose.yml

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by reproducing the reported `docker login` failure with the provided devcontainer.json and the docker-in-docker feature configuration; there is no Dockerfile or Compose file. Inspect how the feature configures Docker credential storage and verify the result by confirming that docker login can save credentials without the reported credential-helper error.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker
Bereich
devops, infrastructure
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.