Created
May 14, 2020 04:07
-
-
Save davidawad/8cee7282fe769e455a7e7d611a1032dd to your computer and use it in GitHub Desktop.
create a docker swarm service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a docker swarm service | |
docker service create \ | |
--name=redis \ | |
--publish=6379:6379/tcp \ | |
--constraint=node.role!=manager \ | |
--mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \ | |
arm32v7/redis:latest |
note that with the publish command, the external port is the first argument
docker service create
--name=viz
--publish=8081:8080/tcp
--constraint=node.role==manager
--mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock
alexellis2/visualizer-arm:latest
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker service create
--name=mongo
--publish=27107:27107/tcp
--constraint=node.role!=manager
--mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock
nonoroazoro/rpi-mongo