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

DIND image for Windows #49

Closed
donny-dont opened this issue Apr 10, 2017 · 18 comments
Closed

DIND image for Windows #49

donny-dont opened this issue Apr 10, 2017 · 18 comments

Comments

@donny-dont
Copy link

Are there any plans for a DIND image for Windows? I'm looking to add support in Drone to build docker windows images but I don't currently see a DIND I can base the image on.

@yosifkit
Copy link
Member

That would require some sort of support from Windows and is not something that they are working on. What is the goal? To just have separate storage of image layers like the Linux DIND? Maybe with enough users wanting this, it might be better filed in docker/docker to try and get support from the Windows guys.

For Linux docker-in-docker you are still running containers at the host level, just controlled by a docker daemon within a container (running --privilged so it has unfettered access to the host system) and a different storage directory.

@donny-dont
Copy link
Author

@yosifkit the goal in this case would be to be able to build Windows containers within a CI system that runs its builds within containers.

Drone is currently doing what you are describing in linux where the container is given privileged access so it can control a build within the container.

I wasn't sure if this was something possible in Docker for Windows and if there was any plans to formalize it into a dind image on Windows.

@tianon
Copy link
Member

tianon commented Apr 11, 2017 via email

@tianon
Copy link
Member

tianon commented Jun 1, 2017

Closing, given that this requires support both from the Windows Kernel/HCS folks and Docker (and there's nothing we can do in this image). Maybe this will be possible someday! 😇

@jankap
Copy link

jankap commented Aug 19, 2021

There are images for windows servercore: https://hub.docker.com/_/docker/ and https://github.com/docker-library/docker/blob/83e4de3bc2aac346e2f76129b1a3a556c1e1bb95/20.10/windows/windowsservercore-1809/Dockerfile

however, I can't get them running since --privileged is not supported on Windows. I guess that docker cannot start in the guest:
image

So why do these images exist?

@yosifkit
Copy link
Member

So why do these images exist?

The windows images are for having a client-side docker, not for running "docker-in-docker" (dind).

@jankap
Copy link

jankap commented Aug 19, 2021

So why do these images exist?

The windows images are for having a client-side docker, not for running "docker-in-docker" (dind).

Thanks. I could passthrough the host Docker Service via named pipes, so this feels like a Docker in Docker lite, because I can still build images from inside this image. I wonder why this is almost not documented, are there drawbacks using that mechanism?

I wonder how to build Docker Windows images from GitLab CI pipeline without Docker in Docker?

@tianon
Copy link
Member

tianon commented Aug 19, 2021

To build Windows Docker images, you'll have to have a Windows Docker engine running somewhere and the ability to connect to it. Doing so in GitLab CI is probably going to require a Windows worker and mounting the named pipe inside your jobs somehow (I'd suggest asking in a GitLab specific forum for more assistance doing so).

@fstamour
Copy link

fstamour commented Oct 5, 2021

Locally, I was able to run docker-in-docker on windows, with windows container with this:

docker run -it --rm --volume //./pipe/docker_engine://./pipe/docker_engine docker:20.10-windowsservercore-1809

@tianon
Copy link
Member

tianon commented Oct 6, 2021

That's not the Docker engine running in Docker, but rather the Docker client running inside Docker, talking to the Docker engine on the host (which isn't really docker-in-docker in the same way running docker:dind is).

@sebastiancanonaco41

This comment was marked as off-topic.

@tianon

This comment was marked as off-topic.

@vancouverwill
Copy link

why is this not mentioned in either the Dockerfile https://github.com/docker-library/docker/blob/ca257b920303ae46cff2a8399471318ad48d67b4/20.10/windows/windowsservercore-ltsc2022/Dockerfile or https://hub.docker.com/_/docker where it specifically talks about Docker in Docker?

@tianon
Copy link
Member

tianon commented May 26, 2022

Good point! Opened docker-library/docs#2157 👍

@vancouverwill
Copy link

thanks @tianon

@psimms-r7
Copy link

With k8s dockershim deprecation is there plans for support of a dind image for windows?

@tianon
Copy link
Member

tianon commented Jan 24, 2023

Sorry, I'm really confused - I understand each half of that, but not what they have to do with each other? 😅

Are you perhaps looking for https://github.com/Mirantis/cri-dockerd (which is the new externally-maintained "dockershim" replacement if you want Docker underneath Kubernetes)?

@mayur7436
Copy link

To build Windows Docker images, you'll have to have a Windows Docker engine running somewhere and the ability to connect to it. Doing so in GitLab CI is probably going to require a Windows worker and mounting the named pipe inside your jobs somehow (I'd suggest asking in a GitLab specific forum for more assistance doing so).

@jankap Did you manage to build images from inside this image? And how did you passthrough the host Docker Service via named pipes as you mentioned to be able to build images from inside this image?

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

9 participants