lukaskorl/swarm-wrapperis a container for running other containers with Docker Compose on a swarm node with access to features like devices which are not available to Swarm Mode.
- Temporarily overcome limitations of Swarm Mode
- Access to hardware devices on Swarm node (i.e. USB devices)
- Personal use-case is running a ser2net container in a Docker Swarm
For testing purposes run this image with a Compose file mounted or attached as a secret to /compose.yml:
# Using mount
docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ./demo/docker-compose.yml:/compose.yml:ro \
lukaskorl/swarm-wrapperThis container includes a socat proxy for usage in Swarm mode. It can proxy TCP traffic to another container.
docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ./demo/docker-compose.yml:/compose.yml:ro \
-e PROXY_TARGET=host.docker.internal:8088 \
-p 8080:8080 \
lukaskorl/swarm-wrapperIn this scenario the whoami container is exposed on port 8088 directly by the compose stack. And on port 8080 through the proxy. Check the output by running curl http://localhost:8080 and curl http://localhost:8088.
This container has been develop from an idea of js-home.org originating from a discussion on the Swarmkit repo.
