{"id":13403059,"url":"https://github.com/dockersamples/docker-swarm-visualizer","last_synced_at":"2025-05-14T15:06:09.436Z","repository":{"id":37587653,"uuid":"61750042","full_name":"dockersamples/docker-swarm-visualizer","owner":"dockersamples","description":"A visualizer for Docker Swarm Mode using the Docker Remote API, Node.JS, and D3","archived":false,"fork":false,"pushed_at":"2024-10-26T07:12:05.000Z","size":2176,"stargazers_count":3315,"open_issues_count":11,"forks_count":592,"subscribers_count":102,"default_branch":"master","last_synced_at":"2025-05-06T03:01:57.461Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dockersamples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-22T20:40:20.000Z","updated_at":"2025-05-03T16:47:50.000Z","dependencies_parsed_at":"2022-08-03T07:01:34.294Z","dependency_job_id":"0cfa5651-7607-40bf-bc40-5dff1a04c3b9","html_url":"https://github.com/dockersamples/docker-swarm-visualizer","commit_stats":{"total_commits":153,"total_committers":35,"mean_commits":4.371428571428571,"dds":0.7973856209150327,"last_synced_commit":"d34a3c722957906af267db8f7d93e9e238ca4188"},"previous_names":["manomarks/docker-swarm-visualizer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockersamples%2Fdocker-swarm-visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockersamples%2Fdocker-swarm-visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockersamples%2Fdocker-swarm-visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockersamples%2Fdocker-swarm-visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dockersamples","download_url":"https://codeload.github.com/dockersamples/docker-swarm-visualizer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253745056,"owners_count":21957317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T19:01:24.870Z","updated_at":"2025-05-14T15:06:09.418Z","avatar_url":"https://github.com/dockersamples.png","language":"JavaScript","readme":"\n\n![Sample image of  nodes with data](./nodes.png)\n\n# Docker Swarm Visualizer\n*** note ***\n_This only works with Docker Swarm Mode in Docker Engine 1.12.0 and later. It does not work with the separate Docker Swarm project_\n\u003e Also this is a sample app meant for learning Docker. Running this app in production is insecure and should be avoided. If you want to run it in production you must take all security precautions, and in particular [Protect the Docker daemon socket](https://docs.docker.com/engine/security/https/) with SSL.\n\nThis project was originally created by [Francisco Miranda](https://github.com/maroshii) for the 2015 DockerCon EU keynote. It was adapted to be used for the 2016 DockerCon US keynote showcasing [Docker swarm mode](https://docs.docker.com/engine/swarm/). Since then the community has generously contributed many updates. Thanks to all the contributors, and a special thanks to [@DovAmir](https://github.com/DovAmir) and [@alexellis](https://github.com/alexellis) for their big contributions.\n\nDemo container that displays Docker services running on a Docker Swarm in a diagram.\n\nThis works only with [Docker swarm mode](https://docs.docker.com/engine/swarm/) which was introduced in Docker 1.12. These instructions presume you are running on the master node and you already have a Swarm running.\n\nEach node in the swarm will show all tasks running on it. When a service goes down it'll be removed. When a node goes down it won't, instead the circle at the top will turn red to indicate it went down. Tasks will be removed.\nOccasionally the Remote API will return incomplete data, for instance the node can be missing a name. The next time info for that node is pulled, the name will update.\n\nTo run:\n\n```\n$ docker run -it -d -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock dockersamples/visualizer\n```\n\nIf port 8080 is already in use on your host, you can specify e.g. `-p [YOURPORT]:8080` instead. Example:\n\n```\n$ docker run -it -d -p 5000:8080 -v /var/run/docker.sock:/var/run/docker.sock dockersamples/visualizer\n```\n\nTo run with a different context root (useful when running behind an external load balancer):\n\n```bash\n$ docker run -it -d -e CTX_ROOT=/visualizer -v /var/run/docker.sock:/var/run/docker.sock dockersamples/visualizer\n```\n\nTo run in a docker swarm:\n\n```\n$ docker service create \\\n  --name=viz \\\n  --publish=8080:8080/tcp \\\n  --constraint=node.role==manager \\\n  --mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \\\n  dockersamples/visualizer\n```\n\n## Supported architectures\n\nThe main `dockersamples/visualizer` image supports **linux/amd64**.\n\n**For armhf**, there is a pre-built image available. See [Running on ARM](#running-on-arm).\n\n**For Windows**, there is a separate `Dockerfile.windows` and image. See [Running on Windows](#running-on-windows).\n\n**Missing your architecture?** See [Building a custom image](#building-a-custom-image).\n\n## Running on ARM\n\n[@alexellisuk](https://twitter.com/alexellisuk) has pushed an image to the Docker Hub as `alexellis2/visualizer-arm:latest` it will run the code on an ARMv6 or ARMv7 device such as the Raspberry Pi.\n\n```\n$ docker service create \\\n  --name=viz \\\n  --publish=8080:8080/tcp \\\n  --constraint=node.role==manager \\\n  --mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \\\n  alexellis2/visualizer-arm:latest\n```\n\n* Update/rebuild the image:\n\nIf you would like to build the image from source run the following command:\n\n```\n$ docker build -t visualizer-arm:latest .\n```\n\n\u003e Make sure you do this on a Raspberry Pi directly.\n\n[View on Docker Hub](https://hub.docker.com/r/alexellis2/visualizer-arm/tags/)\n\n## Running on Windows\n\n[@StefanScherer](https://github.com/StefanScherer) has pushed an image to the\nDocker Hub as `stefanscherer/visualizer-windows:latest` it will run the code\nin a Windows nanoserver container.\n\nIf you would like to build the image from source run the following command:\n\n```\n$ docker build -f Dockerfile.windows -t visualizer-windows:latest .\n```\n\nOn Windows you cannot use `-v` to bind mount the named pipe into the container.\nYour Docker engine has to listen to a TCP port, eg. 2375 and you have to\nset the `DOCKER_HOST` environment variable running the container.\n\n```\n$ip=(Get-NetIPAddress -AddressFamily IPv4 `\n   | Where-Object -FilterScript { $_.InterfaceAlias -Eq \"vEthernet (HNS Internal NIC)\" } `\n   ).IPAddress\n\ndocker run -d -p 8080:8080 -e DOCKER_HOST=${ip}:2375 --name=visualizer stefanscherer/visualizer-windows\n```\n\n### Connect to a TLS secured Docker engine\n\nTo work with a TLS secured Docker engine on Windows, set the environment variable `DOCKER_TLS_VERIFY` and\nbind mount the TLS certificates into the container.\n \n```\n$ip=(Get-NetIPAddress -AddressFamily IPv4 `\n   | Where-Object -FilterScript { $_.InterfaceAlias -Eq \"vEthernet (HNS Internal NIC)\" } `\n   ).IPAddress\n\ndocker run -d -p 8080:8080 -e DOCKER_HOST=${ip}:2376 -e DOCKER_TLS_VERIFY=1 -v \"$env:USERPROFILE\\.docker:C:\\Users\\ContainerAdministrator\\.docker\" --name=visualizer stefanscherer/visualizer-windows\n```\n\n## Building a custom image\n*When building for Windows, see [Running on Windows](#running-on-windows)*.\n\nTo build an up-to-date image for any architecture supported by [node:8-alpine](https://hub.docker.com/_/node/) (currently `amd64`, `arm32v6`, `arm32v7`, `arm64v8`, `i386`, `ppc64le` and `s390x`), execute the following command on a device of your target architecture:\n```\n$ docker build -t visualizer-custom:latest .\n```\n\nAfterwards you can start visualizer by using any of the commands stated [above](#docker-swarm-visualizer). Just replace `dockersamples/visualizer` with `visualizer-custom`. For example:\n```\n$ docker run -it -d -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock visualizer-custom\n```\n\n\n## TODO:\n* Take out or fix how dist works\n* Comment much more extensively\n* Create tests and make them work better\n* Make CSS more elastic. Currently optimized for 3 nodes on a big screen\n","funding_links":[],"categories":["JavaScript","Container Operations","HarmonyOS","Community Tools"],"sub_categories":["User Interface","Windows Manager","Cluster Management"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdockersamples%2Fdocker-swarm-visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdockersamples%2Fdocker-swarm-visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdockersamples%2Fdocker-swarm-visualizer/lists"}