Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot link to webcontainer #59

Open
ezekel opened this issue Jan 15, 2021 · 0 comments
Open

Cannot link to webcontainer #59

ezekel opened this issue Jan 15, 2021 · 0 comments

Comments

@ezekel
Copy link

ezekel commented Jan 15, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant