Skip to content

Cannot link to webcontainer #59

@ezekel

Description

@ezekel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions