Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.4k views
in Technique[技术] by (71.8m points)

Exposing docker to internet "Failed to complete tunnel connection"

I'm using this https://github.com/wernight/docker-ngrok , so that my dockerize app will expose to internet. I added it to my docker-compose, but when I up my container I get this error "Failed to complete tunnel connection". when I want to access my app I do it like this myapp.local and it works find because I set up windows host. when I access like this http://localhost I see this , I noticed I cannot access using localhost that's why I used windows host.

enter image description here

Here is my docker-compose

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:
    image: wernight/ngrok
    links:
      - web
    ports:
      - "4040:4040"

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...