devcontainers / devcontainers/features

Docker-in-docker: Can`t docker login

Open
#453 2 comments 1 reaction 0 assignees View on GitHub
duplicate
Dominant language
Shell
Stars
1.5k
Forks
621
Avg merge
2d 11h
Merged PRs (30d)
4

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.