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

Docker-in-Docker fails to install #646

Closed
deepsweet opened this issue Sep 27, 2023 · 4 comments
Closed

Docker-in-Docker fails to install #646

deepsweet opened this issue Sep 27, 2023 · 4 comments

Comments

@deepsweet
Copy link

deepsweet commented Sep 27, 2023

Only happens with the latest Bookworm image. No errors when fixed to Bullseye.

"image": "mcr.microsoft.com/devcontainers/javascript-node:18",
"features": {
  "ghcr.io/devcontainers/features/docker-in-docker:2": {}
}
$ devcontainer --version
0.51.3

$ devcontainer build --workspace-folder .
19.18 Setting up python3-venv (3.11.2-1+b1) ...
19.18 Processing triggers for man-db (2.11.2-2) ...
19.52 error: externally-managed-environment
19.52
19.52 × This environment is externally managed
19.52 ╰─> To install Python packages system-wide, try apt install
19.52     python3-xyz, where xyz is the package you are trying to
19.52     install.
19.52
19.52     If you wish to install a non-Debian-packaged Python package,
19.52     create a virtual environment using python3 -m venv path/to/venv.
19.52     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
19.52     sure you have python3-full installed.
19.52
19.52     If you wish to install a non-Debian packaged Python application,
19.52     it may be easiest to use pipx install xyz, which will manage a
19.52     virtual environment for you. Make sure you have pipx installed.
19.52
19.52     See /usr/share/doc/python3.11/README.venv for more information.
19.52
19.52 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
19.52 hint: See PEP 668 for the detailed specification.
19.54 ERROR: Feature "Docker (Docker-in-Docker)" (ghcr.io/devcontainers/features/docker-in-docker) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/docker-in-docker for help troubleshooting this error.
------
Dockerfile.extended:24
--------------------
  23 |     ENV DOCKER_BUILDKIT="1"
  24 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,source=docker-in-docker_0,target=/tmp/build-features-src/docker-in-docker_0 \
  25 | >>>     cp -ar /tmp/build-features-src/docker-in-docker_0 /tmp/dev-container-features \
  26 | >>>  && chmod -R 0755 /tmp/dev-container-features/docker-in-docker_0 \
  27 | >>>  && cd /tmp/dev-container-features/docker-in-docker_0 \
  28 | >>>  && chmod +x ./devcontainer-features-install.sh \
  29 | >>>  && ./devcontainer-features-install.sh \
  30 | >>>  && rm -rf /tmp/dev-container-features/docker-in-docker_0
  31 |

I believe there are multiple solutions to be applied from the CLI side: https://stackoverflow.com/a/75722775.

@eitsupi

This comment was marked as resolved.

@deepsweet
Copy link
Author

I think this is due to docker compose V1. The Feature should install compose V2 by default.

Same error with "dockerDashComposeVersion": "v2".

@eitsupi
Copy link

eitsupi commented Sep 27, 2023

Same error with "dockerDashComposeVersion": "v2".

Thanks for trying. Sorry for posting inaccurate information.

@samruddhikhandale
Copy link
Member

samruddhikhandale commented Sep 27, 2023

We already have an issue open for tracking this devcontainers/features#577
If anyone's interested, we will appreciate a contribution to add support for bookworm for the Python Feature (else, we plan to get to it soon)

Closing as duplicate, feel free to comment on the main issue.

@samruddhikhandale samruddhikhandale closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2023
@devcontainers devcontainers deleted a comment from samphanmitkaew Oct 12, 2023
@devcontainers devcontainers deleted a comment from samphanmitkaew Oct 12, 2023
@devcontainers devcontainers deleted a comment from samphanmitkaew Oct 12, 2023
@devcontainers devcontainers deleted a comment from samphanmitkaew Oct 12, 2023
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