docker-for-windows

Docker tries to mkdir the folder that I mount

谁说我不能喝 提交于 2019-12-04 22:19:35
Why is Docker trying to create the folder that I'm mounting? If I cd to C:\Users\szx\Projects docker run --rm -it -v "${PWD}:/src" ubuntu /bin/bash This command exits with the following error: C:\Program Files\Docker Toolbox\docker.exe: Error response from daemon: error while creating mount source path '/c/Users/szx/Projects': mkdir /c/Users/szx/Projects: file exists. I'm using Docker Toolbox on Windows 10 Home. I got this error after changing my Windows password. I had to go into Docker settings and do "Reset credentials" under "Shared Drives", then restart Docker. Make sure the folder is

Connect to SQL Server in local machine (host) from docker using host.docker.internal

喜夏-厌秋 提交于 2019-12-04 20:18:35
I'm trying to connect to my SQL Server instance running in my local computer using host.docker.internal (as recommended in https://docs.docker.com/docker-for-windows/networking/#use-cases-and-workarounds ) The host.docker.internal is successfully resolved to an IP, and it's ping-able And I've opened up the port 1433 in my firewall configuration Error message Connection refused 192.168.65.2:1433 My connection string Data Source=host.docker.internal,1433;Initial Catalog=;Persist Security Info=False;User ID=;Password=;MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False

How to start Docker daemon (windows service) at startup without the need to log-in?

此生再无相见时 提交于 2019-12-04 09:38:45
问题 We have Docker for Windows installed on a Windows Server 2016 Datacenter box. We use this box as a build agent for our docker containers. When we try to connect to this box via the daemon to build a container, we get an error message indicating the daemon is not running (at end of post). However, if I login to this box using my AD Account, the daemon starts, runs, and then I can connect and do everything I need to do. Is there a way to make daemon start at boot without requiring the user to

Invalid mount config for type “bind”: bind source path does not exist when trying to run container on Docker for Windows

白昼怎懂夜的黑 提交于 2019-12-04 07:58:26
I'm trying to run the Prometheus sample at https://docs.docker.com/engine/admin/prometheus/#use-prometheus using Docker on Windows. I'm executing the following command: docker service create --replicas 1 --name my-prometheus ` --mount type=bind,source="C:/temp/prometheus.yml",destination=/etc/prometheus/prometheus.yml ` --publish published=9090,target=9090,protocol=tcp ` prom/prometheus The error is: invalid mount config for type "bind": bind source path does not exist I'm pretty certain the file exists ( Test-Path with PowerShell returns true). Any idea what I'm doing wrong? Update Running

Error “Failed to OpenForBackup failed in Win32” when pulling microsoft/nanoserver container

南楼画角 提交于 2019-12-04 04:15:34
问题 I encounter the following error when attempting to pull the microsoft/nanoserver image. The download is successful. This error occurs during extraction of the image. 482ab31872a2: Download complete failed to register layer: re-exec error: exit status 1: output: Failed to OpenForBackup failed in Win32 : open \?\C:\ProgramData\Docker\windowsfilter\07bd46b89b4520e984bc0892bad2c955afec4b347f961ca6c31bfe5e30601806\Files\Windows\System32\drivers\etc\hosts: Access is denied. (0x1f) \?\C:\ProgramData

Docker Desktop for Windows: cannot access service on exposed port in windows container mode

久未见 提交于 2019-12-04 02:14:04
I am using the following Dockerfiles to create a container running Jenkins in a windows container on Windows 10 desktop running Docker Desktop for Windows version 17.03 FROM microsoft/windowsservercore RUN powershell -Command wget 'http://javadl.oracle.com/webapps/download/AutoDL?BundleId=210185' -Outfile 'C:\jreinstaller.exe' ; Start-Process -filepath C:\jreinstaller.exe -passthru -wait -argumentlist "/s,INSTALLDIR=c:\Java\jre1.8.0_91" ; del C:\jreinstaller.exe ENV JAVA_HOME c:\\Java\\jre1.8.0_91 RUN setx PATH %PATH%;%JAVA_HOME%\bin CMD [ "java.exe" ] I create the image from this docker file:

Change file permissions in mounted folder inside docker container on Windows Host

谁说我不能喝 提交于 2019-12-03 15:27:25
Disclaimer/Edit 2 Some years later, for everyone reading this question - If you are on Windows and want to use docker with linux containers, I highly recommend not using docker for windows at all and instead starting the entire docker environment inside a VM altogether. This Ext3 NTFS issue will break your neck on so many different levels that installing docker-machine might not even be worth the effort. Edit: I am using docker-machine which starts a boot2docker instance inside a Virtualbox VM with a shared folder on /c/Users from which you can mount volumes into your containers. The

Minikube vs Kubernetes in Docker for Windows

半世苍凉 提交于 2019-12-03 08:39:24
问题 Most tutorials I've seen for developing with Kubernetes locally use Minikube. In the latest Edge release of Docker for Windows, you can also enable Kubernetes. I'm trying to understand the differences between the two and which I should use. Minikube lets you choose the version of Kubernetes you want, can Docker for Windows do that? I don't see a way to configure it. Minikube has CLI commands to enable the dashboard, heapster, ingress and other addons. I'm not sure why because my

Docker Windows build fails with error: “The system cannot find the path specified”

半世苍凉 提交于 2019-12-03 05:49:58
I tried to create a directory junction on Docker Windows to create 8.3 . But it failed with the error message below. D:\data\docker\sample>docker build -t sample . Sending build context to Docker daemon 1.272GB Step 1/4 : FROM microsoft/windowsservercore ---> 2cddde20d95d Step 2/4 : RUN fsutil.exe behavior set disable8dot3 0 ---> Running in ec6e7cc09ec6 The registry state is now: 0 (Enable 8dot3 name creation on all volumes). ---> 53805bc21858 Removing intermediate container ec6e7cc09ec6 Step 3/4 : RUN mklink /J "C:\PROGRA~1" "C:\Program Files" ---> Running in 2116f2070e6a Junction created for

What is linux equivalent of “docker.for.mac.host.internal”

旧街凉风 提交于 2019-12-03 05:45:59
问题 On Mac and Windows it is possible to use docker.for.mac.host.internal (replaces docker.for.mac.localhost ) and docker.for.win.host.internal (replaces docker.for.win.localhost ) host.docker.internal (Docker 18.03+) inside container. Is there one for Linux that will work out of the box without passing env variables or extracting it using various cli commands. 回答1: Depends what you're trying to do. If you're running with --net=host , localhost should work fine. If you're using default networking