Skip to content

DIND image for Windows #49

Closed
Closed

Description

@donny-dont

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.

Activity

  1. yosifkit commented on Apr 10, 2017

    @yosifkit
    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.

  2. donny-dont commented on Apr 10, 2017

    @donny-dont
    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.

  3. tianon commented on Apr 11, 2017

    @tianon
    Member
  4. tianon commented on Jun 1, 2017

    @tianon
    Member

    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! 😇

  5. jankap commented on Aug 19, 2021

    @jankap

    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?

  6. yosifkit commented on Aug 19, 2021

    @yosifkit
    Member

    So why do these images exist?

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

  7. jankap commented on Aug 19, 2021

    @jankap

    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?

  8. tianon commented on Aug 19, 2021

    @tianon
    Member

    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).

  9. fstamour commented on Oct 5, 2021

    @fstamour

    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
  10. tianon commented on Oct 6, 2021

    @tianon
    Member

    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).

  11. sebastiancanonaco41 commented on Feb 10, 2022

    @sebastiancanonaco41
  12. tianon commented on Feb 10, 2022

    @tianon
  13. tianon commented on May 26, 2022

    @tianon
    Member

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

  14. vancouverwill commented on May 27, 2022

    @vancouverwill

    thanks @tianon

  15. psimms-r7 commented on Jan 24, 2023

    @psimms-r7

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

  16. tianon commented on Jan 24, 2023

    @tianon
    Member

    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)?

  17. mayur7436 commented on Jun 7, 2023

    @mayur7436

    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?

  18. jankapte commented on Oct 10, 2025

    @jankapte

    @mayur7436 sorry, very late response.

    Yes I was by adding volumes = ["c:\\cache", "\\\\.\\pipe\\docker_engine:\\\\.\\pipe\\docker_engine"] to the runner's config.toml.

    But it's not very safe to do so because you're exposing the Host OS Docker socket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions