Skip to content

ala-mode/docker-netforce

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

A hackey `bash` script that forces Docker to use the host's networking. This should override the use of Docker's network interface, which is not a globally configurable setting. This is useful when a user cannot modify the Dockerfiles of containers, and wishes to avoid potentially complex namespace mapping solutions, and simply wishes to use the host system's networking.

Currently only looks for `build` and `run`, and only triggers once per invocation.

This will cause the script to trigger in the case of
`docker build foo:latest`
and then again with
`docker run foo:latest`
but not `docker build foo:latest && docker run foo:latest`
Therefore, use with caution.

The intended use is to move the original `docker` executable binary in `$PATH` to `docker.real` and move this script to the location of the original.
For example:
`mv /usr/bin/docker /usr/bin/docker.real`
`mv ./docker /usr/bin/docker && chmod +x /usr/bin/docker`

 Another pattern that could be useful to some users would be to rename this script to `docker-netforce` and add to `$PATH` and invoke that when needed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages