We have been using windows containers as test rigs for while now with great success. However since the last windows update, the container seems it crashes the host system (Windows Server 2019 std).
The server will be running fine for hours, then minutes after executing one of these commands it will crash.
docker run -it --rm -p 8000:80 --name core_sample mcr.microsoft.com/dotnet/core/samples:aspnetapp
docker run --name test mcr.microsoft.com/windows/nanoserver:1809
Just wondering if anybody else is experiencing the same? We already tried to reinstall the host but no joy.
Going on #cael-ras idea of trying a Ubuntu container, I installed HyverV and is now running my containers in Hyper-V isolation mode (--isolation=hyperv) instead of process mode. That seems to have fixed the issue. Thanks
https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/hyperv-container
Related
I'm planning to run my existing rails application from a ubuntu image in docker where the host machine is Windows 10.
I did port binding with docker run -p 6000:3000 -td myimage.Then I login into the container using this command docker exec -it mycontainer bash. Then I've used git to get my app and installed all the dependency and gems and the server starts normally in port 3000 of the container (See image)
When I open localhost:6000 on my host Windows machine, I found no response. I tried searching a lot but no results. What am I missing here?
So it was actually problem from rails I think. Using "rails s -b 0.0.0.0 " to start up the server instead of "rails s" solved the problem, which binds directly localhost. Thank you everyone for your help!
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 created a docker image, where Virtualbox is running inside of a Docker Container (Base Image is a modified Ubuntu-20.04)
I fixed everything regarding creating the image and now my Virtual Machines are running inside the Container. Now I am trying to access these via RDP from the Host (also Ubuntu 20.04), via rdesktop.
The command running the Image is:
docker run -d --privileged --name vbox --device /dev/vboxdrv:/dev/vboxdrv -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v /tmp:/tmp -v ~/machines:/machines -p 3389:3389 -it vboxsystemd
The VM started headless with vboxmanage startvm nameofvm --type headless, vrde is on and the port is 3389
I got the IP of the container by docker inspect vbox, then i tried connecting it by typing rdesktop ip:3389
It just says it cannot connect, and I have no idea how I could fix this.
Currently I am only running 1 VM, which I imported from the local Virtualbox, where it is working without any problems. It is also starting without problems inside the container.
Thanks in advance for helping me.
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?
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.