docker-ngrok icon indicating copy to clipboard operation
docker-ngrok copied to clipboard

Cannot link to webcontainer

Open ezekel opened this issue 5 years ago • 0 comments

Can someone help me please why I cannot link to my nginx container ?

 web:
    image: nginx:stable
    container_name: webcontainer
    ports:
      - "80:80"
    volumes:
      - ./:/var/www/myapp
      - ./myapp.conf:/etc/nginx/conf.d/myapp.conf
    expose:
      - 9000
    external_links:
      - php
      - db
      - ngrok
  ngrok:
    image: wernight/ngrok
    ports:
      - "4040:4040"

image

when I run this command

docker run --rm -it --link webcontainer wernight/ngrok ngrok http webcontainer:80

I will get an error

docker: Error response from daemon: Cannot link to /webcontainer, as it does not belong to the default network.

please help I'm confuse

Thank you in advance

ezekel avatar Jan 15 '21 17:01 ezekel