Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/n-johnson/docker-forward

Docker image to expose a port of an already running container to the host machine
https://github.com/n-johnson/docker-forward

Last synced: 3 months ago
JSON representation

Docker image to expose a port of an already running container to the host machine

Awesome Lists containing this project

README

        

# docker-forward
Docker image to expose a port of an already running container to the host machine

### Usage:

```

docker run -it -p 5000:5000 --env PORT_LOCAL=5000 --env ADDRESS_REMOTE=172.17.0.2 --env PORT_REMOTE=5432 njohnson/docker-forward

```

The port exposed via `-p 5000:5000` must match the variable set as PORT_LOCAL. There currently is not a way for a running container to introspect its own exposed ports, so it must be manually set via the environment variable PORT_LOCAL.