Search code examples
dockerjwilder-nginx-proxy

docker - jwilder/nginx-proxy, container create issue


After updating dockeron Version 18.03.0-ce-win59 (16762), jwilder/nginx-proxy doesn't running.

i'm currently working on WINDOWS 10 and DOCKER VERSION:18.03.0-ce-win59 (16762). And Here is my docker Compose file.

version: "3.1"

services:

  #docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock jwilder/nginx-proxy  
  proxy-server:
    image: jwilder/nginx-proxy
    container_name: proxy-server
    ports: 
      - 80:80
    volumes: 
      - /var/run/docker.sock:/tmp/docker.sock
    networks:
      - development_network

and the error is:

ERROR: for proxy-server Cannot create container for service proxy-server: b'Mount denied:\nThe source path "\\var\\run\\docker.sock:/tmp/docker.sock"\nis not a valid Windows path' ERROR: Encountered errors while bringing up the project.


Solution

  • I found a workaround, I created .env file in the same directory with docker compose yaml file and I included this line in the file:

    COMPOSE_CONVERT_WINDOWS_PATHS=1

    https://github.com/docker/for-win/issues/1829#issuecomment-376328022