Since a Docker for Windows release in October somewhere they added a linux kernel to Windows Containers to run Linux containers side by side with Windows Containers. I'm having a hard time getting it to run. The following is from the changelog of the current Docker Edge rc:
LCOW containers can now be run next to Windows containers (on Windows
RS3 build 16299 and later). Use --platform=linux in Windows
container mode to run Linux Containers On Windows. Note that LCOW is
still experimental, it requires daemon experimental option.
I'm using a non-modified version of the RabbitMQ image.
When executing docker run:
docker run -d --platform=linux --name rabbit1 -e RABBITMQ_ERLANG_COOKIE='SWQOKODSQALRPCLNMEQG' -e RABBITMQ_DEFAULT_USER=rabbitmq -e RABBITMQ_DEFAULT_PASS=rabbitmq -p 15672:15672 -p 5672:5672 rabbitmq:3-management
I don't get any errors, the container stops as soon as it's booted and the log contains the following error:
chmod: changing permissions of '/var/lib/rabbitmq/.erlang.cookie': Operation not permitted
Removing the cookie argument gets it running for a few seconds until this is in the containers log:
09:49:48.020 [error] Failed to change mode: eperm
09:49:50.190 [error] Cookie file /var/lib/rabbitmq/.erlang.cookie must be accessible by owner only
Which is basically the same error. I tried adding this to the docker run, but the cookie file is created in the process of starting RabbitMQ.
** It's running fine and dandy with Docker in Linux container mode.
Environment:
Windows 10 Version 1709
Windows PowerShell is running as admin
Docker version 18.02.0-ce-rc1, build 5e1d90a
There is a known issue with RabbitMQ on LCOW, it is stated on the docs: https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/linux-containers#known-app-issues
According to Microsoft:
Bind mounting volumes with docker run -v ... stores the files on the Windows NTFS filesystem, so some translation is needed for POSIX operations. Some filesystem operations are currently partially or not implemented, which may cause incompatibilities for some apps.
Related
I want to build docker swarm cluster on windows. To do this I choose Windows Server 2019 in 1809 Version. I work on my local machine and using Vagrant box vm.box=StefanScherer/windows_2019 I created enviroment for developing purposes.
Set Hostname.
Set private network (192.168.52.100)
Install Docker-EE
On this Windows I have installed docker-ee by using command Install-Package Docker -ProviderName DockerMsftProvider -RequiredVersion 19.03 -Force, and docker work perfectly.
docker version return everething ok
docker run -it --rm -p 8000:80 --name aspnetcore_sample mcr.microsoft.com/dotnet/core/samples:aspnetapp -> also work perfectly.
My first issue is when I perform command docker swarm init --advertise-addr=192.168.52.100 I notice my internet connection is lost for a while (also init/join/leave).
And the secound issue is routing mesh, it is not working
Steps to reproduce:
docker service create --publish published=8050,target=80,mode=ingress --name aspnetcore_sample mcr.microsoft.com/dotnet/core/samples:aspnetapp
Open web browser http://127.0.0.1:8050/ (on machine where I init swarm)
Now I should have access to this sample app under 8050 port. But http://127.0.0.1:8050/ is not working
I know I can use mode=host but I think mode=ingress should work.
I also checked it with the same commands on linux and it works without any problem
How can I resolve this issue?
I have a problem connecting a windows container I wish to use for running automation scripts.
Host - Primary Operating System which is running HyperV and docker
(Access to UI)
Target - container hosted on Host using docker (No access to UI)
Following are the details of the environment am working on:
Container image : mcr.microsoft.com/windows/servercore
Installed components include: Maven / Java / VNCServer.
Docker container is running on docker using HyperV on the same machine I wish to connect this container to.
Host Operating System is windows 10 pro.
I installed all softwares in the Target by copying them first and performing a silent installation.
I tried the following solutions but none have been possibly working out.
Started container with command : docker run -itd -p 5920:5920 --name containername imagename
Started container with command : docker start containername
Got access to cmd of Target node : docker exec -it containername cmd
Ran tasklist to ensure : vnserver was running
On Host supplied the IP address of the Target along with port numbers 5920 which results in errors stating timed out connection.
I need to be able to see the UI of the Target system and be able to
control it on the host.
Tried Commands from Teamviewer -id -p but it itself launches the UI which is not available on the Target system.
Is there a way I can get this working?
Please let me know if you need any additional information.
I was just upgraded to Windows 10 1903 from 1809, then my docker become a little bit weird. Here are my current situation:
OS: Microsoft Windows [ver 10.0.18362.116]
Hyper-V: Installed. I have only one VSwitch called Default Switch.
I reinstalled Docker Desktop for Windows v2.0.0.3. (Docker version 18.09.2, build 6247962)
The docker can run without problem. Only the network issue!
Here is what I tried:
Run iis container in "process" isolation mode.
docker run -d --rm -p 80:80 --isolation process mcr.microsoft.com/windows/servercore/iis:windowsservercore-1903
I can connect to port 80 through localhost.
Run iis container in "hyperv" isolation mode.
docker run -d --rm -p 80:80 --isolation hyperv mcr.microsoft.com/windows/servercore/iis:windowsservercore-1903
I can't connect to port 80 through localhost. I was okay before I upgrade to Windows 10 1903.
I almost tried everything I can try. I just can't get my localhost (loopback interface) works.
I tried on the other machine. When docker started, there is a nat VSwitch will be created by docker. It doesn't work on my machine.
I tried to create a new VMSwitch and named nat but doesn't works.
I tried to run .\WindowsContainerNetworking-LoggingAndCleanupAide.ps1 -Cleanup -ForceDeleteAllSwitches using this script. Restart the computer. It doesn't works.
I completely removed Hyper-V and Docker. Reinstall again doesn't works.
I tried to list networks defined in hnsdiag. (hnsdiag list networks) Then deleted the nat network. Restart the HNS service. Restart Docker again. It doesn't work.
May I ask what else I can do for my docker network settings?
I am behind a corporate firewall, running on Windows 7. I believe that I have gotten past any proxy issues (at least as far as accessing the container for which I'm trying to install.)
At this point I'm trying to execute docker's run command which 'acquires' the tensorflow package an installs it on my system.
$ docker run -it -p 8888:8888 gcr.io/tensorflow/tensorflow
C:\Program Files\Docker Toolbox\docker.exe: An error occurred trying to connect:
Post https://192.168.99.100:2376/v1.23/containers/create: Service Unavailable.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.
I'm new to docker, (obviously) but I see that the 192.168.99.100 default docker container exists and is running.
I do see documentation regarding the 'create' service endpoint. I'm at a dead end. Any help is appreciated.
-gene
when you type docker command docker client try to connect with your local docker service. And in linux world you need a superuser privileges to connect client and service.
I don`t run docker on windows, but may be you need run docker as Administrator. like linux
sudo docker run ...
I´ve installed CoreOs on BareMetal (dedicated 16GB, 4cores Atom). Docker is running and despite the fact that simple bash instructions run properly, when launching dockerui images downloaded form the hub I get the /var/run/docker.sock not found.
The sock file is present and docker daemon is running. When launching docker daemon in interactive shell I get no error from the daemon; but the error is coming from the client requesting running the image.
I bet the container you downloaded expects the docker socket to be mounted in as a volume, so that I can control it or issue docker commands.
Check that the docs you are following don't have docker run -v flag in them.