https://github.com/simmsb/container-per-ip
Some thing so you can spin up a container per client ip
https://github.com/simmsb/container-per-ip
autoscaling docker reverse-proxy scaling
Last synced: 28 days ago
JSON representation
Some thing so you can spin up a container per client ip
- Host: GitHub
- URL: https://github.com/simmsb/container-per-ip
- Owner: simmsb
- License: mit
- Created: 2019-11-21T01:47:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-10T00:31:22.000Z (over 2 years ago)
- Last Synced: 2025-01-07T08:18:51.648Z (over 1 year ago)
- Topics: autoscaling, docker, reverse-proxy, scaling
- Language: Rust
- Homepage:
- Size: 150 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# container-per-ip

Some thing so you can spin up a container per client ip
This works by spawning a new container based on the host address of a connecting
client.
Concurrent tcp connections route to the same container, containers are removed
when a timeout has elapsed since the last connection closed.
```
container-per-ip
Ben Simms
Run a container per client ip
USAGE:
container-per-ip [OPTIONS]
ARGS:
The docker image to run for each ip
OPTIONS:
-b, --binds
Volume bindings to provide to containers
-e, --env
Environment variables to set on the child container
--force-pull
Always pull the image on start
-h, --help
Print help information
-n, --network
Set the docker network containers should be started in
-p, --ports
Ports to listen on
The supported syntax for ports is: udp:53, tcp:8080:80 (outside:inside), tcp:5000-5100
(range), tcp:5000-5100:6000-6100 (outside range - inside range)
--parent-id
Specifies the unique id set in the container-per-ip.parent tag of spawned containers.
By default, containers will be tagged with `container-per-ip.parent = `
If specified, containers will be tagged with `container-per-ip.parent =
`
--privileged
Should the containers be started with the `--privileged` flag
-t, --timeout
Timeout (seconds) after an IPs last connection disconnects before killing the associated
container
[default: 300]
```
## Running in docker
```
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --net=host -it nitros12/container-per-ip --help
```