-
Notifications
You must be signed in to change notification settings - Fork 291
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
Can't use host docker daemon from container #4642
Comments
@GabrielBB, I created a GitLab repo for you to clone and test, which connects a Linux Docker container (in which you can develop your code with VS Code) to your Windows Docker host. Hope it helps! It requires Docker Desktop for Windows, VS Code, and the "Remote Development" extension for VS Code. I think you'll like it! |
As per this Container Solutions post, the Docker binary also needs to be mounted onto the Jenkins container. The Docker binary is located in
I also needed to add |
@naamancampbell OMG Finally. "-v /usr/local/bin/docker:/usr/bin/docker" worked! For some reason everybody says that "/var/run/docker.sock:/var/run/docker.sock" should work on Windows too but it didn't. Thanks ! Closing Issue |
Windows10: docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
--user root \
images:tag solve this problem |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
No matter what I and a co-worker try, we can't connect to the docker daemon in our Windows host. I check that the container has the
/var/run/docker.sock
file but we still get a "docker: command not found" when executingdocker exec -t ${container} docker ps
. We are not using a windows container.This is how I'm running the container:
docker run -d -p 49001:8080 -v "D:/container_volumes/jenkins":/var/jenkins_home:z -v /var/run/docker.sock:/var/run/docker.sock -t jenkins/jenkins
I also tried with my personal computer. According to this post it should work.
OS: Windows 10 Pro
Docker Desktop version: 2.1.0.1 (37199)
Image: jenkins/jenkins
The text was updated successfully, but these errors were encountered: