0

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
Wijnand
  • 1,192
  • 4
  • 16
  • 28

1 Answers1

3

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.

Giovanni Bassi
  • 739
  • 6
  • 18
  • I really wonder about the usefulness of LCOW without `chown` and `chmod` - a *lot* of containers use these. Switching back to Linux containers, again... – Cocowalla May 04 '18 at 13:28
  • [Are](https://stackoverflow.com/questions/48560472/how-to-run-rabbitmq-linux-docker-image-using-windows-containers) [you](https://github.com/docker-library/mariadb/issues/144) [sure](https://github.com/docker/for-win/issues/1386)... – Cocowalla May 04 '18 at 15:13
  • [Pretty sure](https://blogs.msdn.microsoft.com/commandline/2018/01/12/chmod-chown-wsl-improvements/), but you have to be on the latest Windows 10 version, stable is `17134.1`. – Giovanni Bassi May 04 '18 at 22:29
  • That's an insider build, not a stable build. Also, the article seems to be about WSL, rather than the 9p filesystem that LCOW uses to share host directories with containers - whether that means it's also fixed for 9p, I don't know – Cocowalla May 05 '18 at 07:33
  • That's what I said, that build was `17063`, and the current one is `17134.1`, which is greater. I just tested and it works. – Giovanni Bassi May 07 '18 at 00:01
  • Ah, sorry, I had read "you have yo be on the latest stable version". But the question is whether these commands work from an LCOW container with a bind mounted volume (that is, is it fixed for 9p)? – Cocowalla May 07 '18 at 06:52
  • Running on `17134.1` aka `Windows 10 1803`... having the same issue as the OP... The container dies after few seconds because has no exclusive access to the cookie – Kralizek May 07 '18 at 11:24