Tag: docker swarm

How can a docker service know about all other containers of the same service?

I’m working on a file sync Docker microservice. Basically I will have a file-sync service that is global to the swarm (one on each node). Each container in the service needs to peer with all the other containers on different nodes. Files will be distributed across the nodes, not a complete duplicate copy. Some files […]

docker swarm: How to inspect ingress-endpoint container

When I inspect ingress I getting info about containers: $docker inspect ingress “Containers”: { “1234567890”: { “Name”: “gateway.1.qwertyuiop”, “EndpointID”: “12345678990”, “MacAddress”: “00:11:22:33:44:55”, “IPv4Address”: “10.255.0.11/16”, “IPv6Address”: “” }, “ingress-sbox”: { “Name”: “ingress-endpoint”, “EndpointID”: “1234567890”, “MacAddress”: “00:11:22:33:44:55”, “IPv4Address”: “10.255.0.3/16”, “IPv6Address”: “” } }, Then I can inspect first container but inspecting ingress-endpoint returns nothing $ docker inspect […]

Source code for Docker Swarm load balancer

This question is quite code-specific rather than concept explanation. I want to study how Docker Swarm’s embedded DNS and Load Balancer is implemented, especially the roundrobin part. I tried searching in Docker github repo with some keywords such as “loadbalancing”, “balancer”, “roundrobin” etc. but no result. I found Docker libnetwork that has keyword RoundRobin but […]

How to see the output of a service in a docker stack?

With Docker Compose, when we run docker-compose up we see the output of all services being presented on the console, even with different colors to make it easier to distinguish them. Even if we have multiple instances of a service, the output of all of them appears there. Now, today I’ve tried deploying a stack […]

How ensure at least one service is running on every Docker Swarm node

Hi have docker swarm running currently on 3 nodes as managers. I have a simple service replicated 6 times spread evenly across all 3 nodes. However when I take 1 or 2 of the nodes offline then all the services spread between the remaining node/nodes. When I bring all the nodes back online all of […]

Docker for Windows Swarm IIS Service with Win10 Insider running but unreachable

I’m currently experimenting with Swarm Services with Docker for Windows. The new Win10 Insider build supports overlay networking for Windows containers and I was pleased to see my IIS service actually starting. The only issue i came across is that i can not reach the service in the browser, despite trying multiple things such as […]

docker-compose v3 + apache spark, connection refused on port 7077

I’m not sure if this is 100% programming or sysadmin related question. I’m trying to setup a docker-compose file, in the version 3, for docker-swarm, docker version 1.13 to test spark for my local workflow. Sadly the port 7077 does only get bound to localhost on my swarm cluster and so is not reachable from […]

Can I connect directly to a docker swarm network?

I want a shell inside a Docker Service / Swarm network. Specifically, I want to be able to connect to a database that’s inside the network. From the manager node, I tried: # docker network ls NETWORK ID NAME DRIVER SCOPE 481c20b4039a bridge bridge local 2fhe9rtim9mz my-network overlay swarm Then docker run -it –network my-network […]

Addressing multiple non docker-swarm services on LAN from within swarm

We have a scenario where we need to contact multiple micro-services outside swarm from services inside swarm. Before moving to swarm, we used –net=host to make the host machines’ hosts file to be available for containers but now we are struggling to achieve the same. What are the options to connect to non docker-swarm services […]

DNS failover with Docker Swarm 1.12

I want to setup a failover for a webservice I’ve written. Everywhere i read that docker swarm 1.12 does automatic failover but I think only for failed containers. How should i configure public DNS for my service? How does failover work if a host is down? With normal dns round robin and IPs of the […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.