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

Custom containers silently fail without docker group #81

Open
Phuurl opened this issue Dec 14, 2021 · 3 comments
Open

Custom containers silently fail without docker group #81

Phuurl opened this issue Dec 14, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@Phuurl
Copy link

Phuurl commented Dec 14, 2021

Describe the bug
Docker Desktop creates unusable environments when using custom containers that do not create the docker group as part of the build.

To Reproduce
Steps to reproduce the behavior:

  1. Create a custom dev environment container definition - eg
    .docker/config.json
    {
      "dockerfile": "Dockerfile.devenv"
    }
    .docker/Dockerfile.devenv
    FROM python:3-alpine
    RUN pip3 install cfn-Lint
    RUN cfn-lint --update-specs
  2. Create dev environment (tested with using existing folder)
  3. See error (and note step is still marked as successful)
    image
  4. Move forward assuming everything is fine, and VSCode will be unable to start the container session due to permission denied errors.

This can be resolved by adding in an addgroup step in the Dockerfile - eg

RUN addgroup --system docker

Expected behavior
Potential behaviours in order of preference - either:
a) Docker Desktop should catch the chown error and transparently create the group if required
b) The requirement for having the group present in custom containers should be documented on the dev environemtns guide, and the wizard should detect the chown error and mark the step as failed

Desktop (please complete the following information):

  • OS: Windows 10
  • Version: 21H1

Version of Docker Desktop:
You can find the version by clicking on the About Docker Desktop menu

4.3.1 (72247)
@Phuurl Phuurl added the bug Something isn't working label Dec 14, 2021
@felipecruz91
Copy link
Contributor

Hi @Phuurl, thanks for opening this issue. We'll get back to you after discussing the issue internally.

@glours
Copy link
Collaborator

glours commented Mar 1, 2022

Hello @Phuurl

A quick update, we didn't fixed your issue ATM, but we at least improved the documentation for this specific point

@arianitu
Copy link

Would this potentially cause issues such as #137?

Why does it need to change the owner of the Docker Socket?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants