Skip to content

Fix Docker setup instructions for host network #1263

@RichardJECooke

Description

@RichardJECooke

On page https://dashboard.ngrok.com/get-started/setup/docker, it says you should use --net=host, but the host network is available only in Linux, where Docker runs natively. On Mac and Windows, this command will fail, as Docker runs in a VM.

For Mac/Windows you need to use host.docker.internal (which won't work on Linux), e.g.:

docker run --net=host -it -e NGROK_AUTHTOKEN=Y0urS3cr3tK3y ngrok/ngrok:latest http http://host.docker.internal

Alternatively, you need to run your app and ngrok on the same Docker network, such as:

docker network create ngrokTest

docker run  --network=ngrokTest -v ".:/app" -w "/app" --name="api" myAppImage"

docker run -it  --network=ngrokTest -e NGROK_AUTHTOKEN=Y0urS3cr3tK3y ngrok/ngrok:3.22.0-alpine-amd64 http http://api

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/dockerdocs/contentChanges to the written material in the docskind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions