So I made sure by installing a fresh windows install to make sure that it really is Docker.
As you install WSL2 you can access the OS's files through Windows explorer as seen:
accessing WSL
As I install Docker Desktop my access to the WSL folder is denied as seen:
docker denying access
I am able to access the folder through using the address: \\wsl.localhost\ubuntu but not just \\wsl.localhost
Is there any way to allow access to \\wsl.localhost again?
edit:
I found a workaround, sadly microsoft is just stupid again.
The address now is \\wsl$ probably because of an update.
I had to go into regedit:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6}\Instance\InitPropertyBag
And change the ResName from \\wsl.localhost to \\wsl$
For that i had to take full ownership of the {B2B4A4D1-2754-4140-A2EB-9A76D9D7CDC6} folder and give me full access rights so i could change ResName. Now it's working fine.
I use Window10 home.
The Configuration window only says Add shortcut to desktop and there are no other check boxes. Is it downloaded correctly?
I have installed latest Docker Desktop. Currently unable to switch to Windows container. The option is blocked from task bar :
I am running Windows 10 Home 64-bit Build 19042.
You need windows 10 Pro or Enterprise to have access to Windows containers.
Source
The other answer will indeed switch your daemon mode to Windows, but you will not be able to pull any Windows container.
Update 2022:
The link above now mentions that it should work for
Windows 11 64-bit: Home or Pro version 21H2 or higher, or Enterprise or Education version 21H2 or higher.
Windows 10 64-bit: Home or Pro 21H1 (build 19043) or higher, or Enterprise or Education 20H2 (build 19042) or higher.
I had spent hours debugging this issue and have to purchase win 10 pro license as well but still faced the same issue, by default it takes linux containers, switching to windows shows waiting forever, anyway here is how I fixed:
Windows Pro
Close/Shutt down the client by right clicking on the tiny icon on taskbar, and wait for a minute or two to have it close itself.
3.Open command prompt with Administrative rights
Type in this command:
c:\Program Files\Docker\Docker\resources>dockerd.exe
Open another command prompt with Administrative rights
C:\Program Files\Docker\Docker>DockerCli.exe -SwitchDaemon
Type "C:\Program Files\Docker\Docker>docker version" command to make sure it has switched to windows containers, it should look like attached screenshot
as per the latest Docker Desktop version, your settings should look like this
Quit Docker Desktop, and open again, Hope it helps some.
This command will change from windows to linux and vice versa.
I could not switch it easily, even using Altaf's approach. Eventually I went to Services (services.msc) and disabled Docker Desktop Service and updated docker service (Docker Engine) to make sure it can automatically start (for example, make sure the daemon.json config file exists in the location as the service command specified).
Then I can verify the result by typing docker version (in non-Administrative command prompt).
https://kontext.tech/article/1216/how-to-change-docker-data-root-path-on-windows-10#h-switch-to-windows-containers
I know I need admin rights to install Docker Desktop; but do I have to be an admin to run it? The documentation doesn't say that I do, and Googling doesn't suggest that either; but if I try to run it as a non-privileged user, the process is killed instantly and I get an event-log entry saying "Process requires elevated rights to run."
I'm running Windows 10 Enterprise in a corporate environment and we have non-privileged accounts. Is Docker Desktop not available in this situation or have I just installed it incorrectly somehow?
As of Docker Desktop 2.4 (possibly earlier, I haven't tested) this is supported. From the Windows installation instructions:
If your admin account is different to your user account, you must add the user to the docker-users group. Run Computer Management as an administrator and navigate to Local Users and Groups > Groups > docker-users. Right-click to add the user to the group. Log out and log back in for the changes to take effect.
I have not tested it, but this article seems to indicate that you can.
TLDR;
Problem
The reason for requiring an admin session is that the Docker client in the default configuration uses a named pipe to connect to the Docker engine and that named pipe can only be accessed by administrators
Solution
To avoid this, you can simple allow your user FullControl access to that named pipe
Original author also provides a powershell tool with sources to help perform this admin task.
The answer appears to be "no". I couldn't understand how everyone else at work had avoided this problem; but then learnt that they had asked for admin rights over their local machines and been granted them! I've only been here for two and a half years ... :|
Latest version of Docker desktop allows this, but the user should be in docker-users group.
If you are using Windows 10 Home edition, then adding multiple groups to a normal users will be a pain, even you use 'netplwiz'.
To add a new group to user you can use the below command in Powershell.
Run the powershell as admin, then execute
net localgroup "docker-users" "<user_name>" /add
I am able to run Docker Desktop from a non-administrator account on my Windows 10 machine. I can also issue docker commands from a non-elevated command prompt or PowerShell prompt. Note that my non-administrator account is a member of the local group docker-users.
Initially, I installed it from my administrator account, and things worked as expected, but only if I stayed logged in as administrator. If I wasn't logged in as administrator, I would get the named pipe error that aboellinger described in his answer.
Simply launching C:\Program Files\Docker\Docker\Docker Desktop.exe from my non-administrator account fixed the issue (after waiting a few seconds for the process to start). It didn't even ask to elevate permissions.
The addition of my user account to group docker-users solved my problem. However, since I'm not running Win10 Pro, the GUI access to account control is not available. Instead I ran PowerShell as admin and added my user account to group docker-users there.
Docker is insecure by design, if a user can run docker command without admin rights (.i.e. belongs to docker group) this basically means that this user can escape the container and become admin on the host. No idea how exactly it can be done on Windows but it "just works" on Linux.
What is the Docker security risk of /var/run/docker.sock?
This has started happening recently after a docker update on my Macbook.
I am using Docker version 17.03.0-ce-mac2 on macos-sierra.
If I run a docker build -t . from a terminal I get a pop-up warning which says:
docker-credential-osxkeychain wants to use your confidential information stored in mydomain.com in your keychain.
Do you want to allow access to this item?
If I click 'deny' everything continues as normal without any issues. But I have to do this every time.
What does this mean ?
It looks like it was a bug in this particular release of Docker and that the new release 17.03.1-ce-mac5 is solving this issue. There is a reference in the release notes: https://github.com/docker/docker-credential-helpers/releases/tag/v0.5.0
I just installed this release and I don't have this behaviour on my El Capitan install.