Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/n-johnson/docker-forward
- Owner: n-johnson
- License: mit
- Created: 2016-01-19T01:00:20.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-19T01:19:46.000Z (almost 9 years ago)
- Last Synced: 2024-07-29T13:35:01.362Z (5 months ago)
- Language: Shell
- Size: 0 Bytes
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.