Hasan Hafiz Pasha
Hasan Hafiz Pasha

Reputation: 1432

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.

Upvotes: 2

Views: 2232

Answers (2)

Fotis Tsakiris
Fotis Tsakiris

Reputation: 46

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

Upvotes: 3

kakabali
kakabali

Reputation: 4033

Can you try removing volumes section or give a location as per your host windows machine.

/var/run/docker.sock location will not be present in your windows system.

either use .:/tmp/docker.sock or specify something like d:/test:/tmp/docker.sock where test folder should exist in the d drive.

Upvotes: -1

Related Questions