-
Notifications
You must be signed in to change notification settings - Fork 371
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
fail to start with amd64 image on macOS M1
#219
Comments
docker-in-docker
fail to start on macOSdocker-in-docker
fail to start if bind mount localWorkspaceFolder on macOS
docker-in-docker
fail to start if bind mount localWorkspaceFolder on macOSdocker-in-docker
fail to start if bind mount localWorkspaceFolder
on macOS
docker-in-docker
fail to start if bind mount localWorkspaceFolder
on macOSdocker-in-docker
fail to start with amd64 image on macOS M1
Thanks for reporting. There seem to have been some transient package issues around this time. Are you still experiencing this issue? @Chuxel @chrmarti I see containerd in the logs above. Would microsoft/vscode-remote-release#6014 pose issues with using containerd? |
No this is a problem with mixing architectures - x86 and arm64. Cross-architecture emulation has a number of limitations. I am guessing that prevents access to the needed underlying devices for it to work. This may not be possible at all. Here's how docker talks about emulation:
|
According to this issue docker/for-mac#6284 (comment), it seems like dind will only works on arm64 image since the M1 amd64 emulator does not support ip routing. While this issue is not related to devcontainer, I think adding a note to the README would be useful for future user. What do you think? |
Yep, that seems reasonable. Adding a NOTES.md to the feature will cause it to appear in the README. |
it may be worth updating this note. as of macOS ventura (13.1) and docker desktop 4.16.1 there is an option to emulate using docker desktop macOS features in development docs i almost gave up when reading this message and thread but decided to try it anyways (since it was just released a few weeks ago). its working great! just had to mount my docker socket from host to devcontainer and the rest worked. reference for others:
FROM --platform=linux/amd64 mcr.microsoft.com/devcontainers/base:ubuntu
RUN ENABLE_NONROOT_DOCKER=false \
/bin/bash \
-c "$(curl -fsSL https://raw.githubusercontent.com/devcontainers/features/main/src/docker-outside-of-docker/install.sh)"
...
...
"mounts": [
// mount the host docker socket so docker can be used in the devcontainer
"source=/var/run/docker.sock,target=/var/run/docker-host.sock,type=bind",
],
... |
@ci-vamp Thank you for your message! This still doesn't work for me, unfortunately. I install docker-in-docker using devcontainer features, I don't know if that makes a difference: // devcontainer.json
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}, I have added the mounts and I have enabled the
|
@antspy i think you need |
@dschneiderch Thank you for your message! Isn't your mount the same as in the previous comment? Unfortunately even when setting remoteUser to root, I still have the same issue. Do you change any docker configuration in the devcontainer? Or maybe you need to add some flags while running? I am simply running with |
Description
docker-in-docker
features fails to run on macOS M1 machine withamd64
imagearm64
imageSteps to reproduce
devcontainer.json
Dockerfile
Issues
sudo dockerd
:Information
The text was updated successfully, but these errors were encountered: