Skip to content

bufferings/docker-access-host

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-access-host

As of 2018-03-30.

Here is a blog post:

https://dev.to/bufferings/access-host-from-a-docker-container-4099

How to check

Prepare a target.

# Start nginx as a target running on host
docker run -p 8888:80 --rm nginx

# You can see 8888 working on the host
curl localhost:8888

Let's access it from a container.

# Build
docker build -t docker-access-host:demo .

# Run. You should be able to see nginx result & hosts file
docker run --rm docker-access-host:demo

# It has host.docker.internal only when the host is Linux

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages