Search code examples
windowsdockercontainerswindows-server-2016portainer

Portainer Setup on Window Server 2016


I followed the steps below to create a portainer container on my host's port 9000.

I am getting the following error:

C:\Program Files\Docker\docker.exe: Error response from daemon: named pipe mounts are not supported on this version of Windows.

Steps to reproduce:

  1. Allow Docker Connection Through Firewall by this:

    netsh advfirewall firewall add rule name="Docker" dir=in action=allow protocol=TCP localport=2375 enable=yes profile=domain,private,public
    
  2. Configure Docker Deamon to listen on both pipe and TCP:

    2.1. StopService docker

    2.2. dockerd --unregister-service

    2.3. dockerd -H npipe:// -H 0.0.0.0:2375 --registerservice

    2.4. Start-Service docker

  3. Pull portainer image: docker pull portainer/portainer

  4. Creating a volume: docker volume create portainer_data

  5. Run Portainer

    docker run -d --name portainer -p 9000:9000 --mount type=npipe,source=\\.\pipe\docker_engine,target=\\.\pipe\docker_engine --mount type=volume,source=portainer_data,target=C:\data portainer/portainer
    

Solution

  • named pipe mounts are not supported on this version of Windows.

    This error means that your Docker version do not support bind mounting named pipes into containers.

    First you must check the Docker version on your system, can be done with docker version.

    Then, you need to ensure that your Docker version is >= 17.09 and use one of these solutions:

    • Docker version = 17.09, bind mount the named pipe as a volume

    docker run -d --name portainer -p 9000:9000 -v \\.\pipe\docker_engine:\\.\pipe\docker_engine --mount type=volume,source=portainer_data,target=C:\data portainer/portainer

    • Docker version >= 18.03, named pipe bind mounts are supported and your command should just work.