Skip to content

Instantly share code, notes, and snippets.

@imedadel
Created July 29, 2020 13:00
Show Gist options
  • Save imedadel/94ea97cae279233e9501eaadf1c7aa28 to your computer and use it in GitHub Desktop.
Save imedadel/94ea97cae279233e9501eaadf1c7aa28 to your computer and use it in GitHub Desktop.
How to connect to localhost from within Docker
  • Connect to localhost from Docker on Linux:
 docker run --network="host" --rm williamyeh/wrk -t8 -c100 -d30s http://localhost:3000
  • Connect to localhost from Docker on Windows and Linux:
 docker run --network="host" --rm williamyeh/wrk -t8 -c100 -d30s http://host.docker.internal:3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment