Questions tagged [docker-swarm]

Part of the docker software suite to cluster docker servers into a single virtual service.

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 views

How are containers secured with MACVLAN networks?

Containers cannot be connected both to an internal bridge and to the host network at the same time, according to this question. However, this is what I need; I want a set of containers to be connected ...
user avatar
  • 11
0 votes
1 answer
41 views

docker command substitution fails on gitlab

I am trying to run the following command as part of a deployment in Gitlab. TIMESTAMP=$(date +%s) docker stack deploy --with-registry-auth --compose-file $(`printf "docker-compose.%s.unimark.yaml&...
user avatar
  • 139
2 votes
1 answer
363 views

How to access a container/service port in swarm without publishing the port to the outside world?

It is possible to docker-compose to forward a port to the container from localhost only, by writing the desired ports configure in docker-compose.yml, e.g. 127.0.0.1:8080:80. In docker swarm this does ...
user avatar
0 votes
0 answers
19 views

Possibility to get rig of docker swarm

We use docker swarm only because of storing secrets purpose. I am investigating if we can either use another approach, docker-compose, for example and get rid of docker swarm or it is easier and ...
user avatar
  • 1
0 votes
0 answers
43 views

What ports to hide for docker swarm?

I am setting up a docker swarm for production and while the documentation is great, I still struggle to figure out exactly what ports should be open/closed for different purposes. In my scenario, I am ...
user avatar
0 votes
2 answers
40 views

What is the supported method for installing Kubernetes on OpenStack?

If I want to install Kubernetes on OpenStack, is there a supported method to do this?
user avatar
0 votes
1 answer
398 views

cap_add and device options not working in docker stack file

I am trying to start docker container on the rockpix node with cap_add and device options but docker stack errors saying $ docker stack deploy -c docker-stack.yml vpnproxy services.vpn_proxy.deploy ...
user avatar
0 votes
1 answer
36 views

Docker Swarm set which service goes to which machine

Docker Swarm set which service goes to which machine. Is there any way to set which service or service replicas goes to which worker machine ?
user avatar
0 votes
0 answers
54 views

Connect Docker Swarm to AWS Application Load Balancer

What is the best practice to connect a Docker Swarm that is deployed in EC2 with an Application Load Balancer? In my configuration the ALB is what Route53 resolves to. The Docker Swarm is configured ...
user avatar
  • 1
0 votes
1 answer
60 views

Why my docker container is running on swarm manager node instead of worker?

This is my docker-stackk.yaml file. # cat docker-stack.yml version: "3.4" services: redis: image: redis:alpine ports: - "6379" networks: - frontend ...
user avatar
1 vote
1 answer
110 views

Docker Swarm stop working with redeploy service, require system reboot

I got a Docker Swarm with 3 nodes, and contain around 40-50 stack on it, now its random stop working to redeploy my new changes its just say in new mode, and really don't know what going one here. ID ...
user avatar
1 vote
0 answers
169 views

Self assigned TLS sertificate traefik

My problem is self assigned cert instead of lets-encrypt cert docker-compose.yml: version: "3.7" services: traefik: image: traefik command: - --api - --providers....
user avatar
  • 111
1 vote
1 answer
214 views

How does Docker Swarm balance tasks?

From docs.docker.com - force-the-swarm-to-rebalance I can see that Docker Swarm "tasks are given to less busy nodes" to reach eventual balance. I'm trying to find more info on what "...
user avatar
  • 629
0 votes
1 answer
67 views

Increase concurrent users by limiting container resources with docker-swarm

Consider the scenario where I have: 4 replicas of an app 4 cores On load, the app consumes 100% for a single core Can I tell each replica to only use 50% of the core and if so, would this allow at ...
user avatar
  • 101
1 vote
1 answer
45 views

Retrieve files deleted after Docker service rm

I had to, so I removed a service with docker service rm but I forgot to get the log files of the service. Now I am not able to find those. Can anyone help me or suggest to me if and how can I get ...
user avatar
0 votes
2 answers
2k views

How to get the IDs of Docker Containers that belong to a Service, given the Service name or id

Background I'm trying to maintain some websites running in a Docker Swarm. I want to do security updates on them. In a non-Docker environment, like a VPS, my simple process is that I would connect in ...
user avatar
1 vote
1 answer
646 views

Cannot access service using docker-swarm, but without

Currently I try to setup docker-swarm using two nodes and deploy portainer on them. Both nodes are virtual machines on the same host and are on the same network (172.16.255.255). Addtionally there is ...
user avatar
  • 121
0 votes
1 answer
36 views

How to deploy MySQL server repeatedly

From fifty-thousand feet, how are, for example, multiple MySQL containers handled? In the context of my limited experience, simply running the container is insufficient, with additional configuration ...
user avatar
1 vote
0 answers
23 views

How to fetch PublishedPort from inspect

I'm trying to fecth the PublishedPort from my docker service. I think I'm close to fetch it. Here is the data : [ { "ID": "a51ijaddvaf1paeh1dn5p1k3", "...
user avatar
1 vote
1 answer
23 views

Linking nodes in a cluster to run a single instance of a docker container

In this cluster, there are 11 identical nodes, each with 16gb of memory. So far, I've been able to connect each node of the cluster to a docker swarm hosted on the control node. My end goal is to run ...
user avatar
3 votes
0 answers
28 views

How can I allow admins to run Django Admin CLI commands against a Django application deployed live as part of a Docker Swarm cluster?

Specifically, I want them to run the following: https://django-q.readthedocs.io/en/latest/monitor.html I am looking to write a minimal wrapper-script which would simply allow them to run a single ...
user avatar
  • 173
2 votes
2 answers
2k views

How to automatically update Swarm services when the Docker daemon restarts

I'm using Docker Swarm, and I have condition: always in the restart_policy of my compose file, so my services are started automatically when the system reboots or the Docker daemon is restarted. What ...
user avatar
  • 153
2 votes
3 answers
231 views

How to get the next friendly name that Docker will assign to the container it will make?

Background When you start a Docker container as in the following example: $ docker run -ti ubuntu:latest Docker docker automatically assigns the container an ID and a friendly name. Docker ...
user avatar
2 votes
1 answer
122 views

Docker swarm container monitoring

I have been on a typical journey of: deploying software on a machine deploying software in a container deploying software using docker swarm The need for this journey is that swarm removes a large ...
user avatar
  • 121
4 votes
2 answers
1k views

Access private DockerHub repo in Docker Swarm

I am trying to deploy a docker swarm using Digital Ocean's docker-machine driver. This is currently a single node that contains several public DockerHub images, and one private. I am having ...
user avatar
  • 141
1 vote
1 answer
4k views

Docker container stuck in "new" state - Docker swarm - service stack

I am deploying a service stack to a Docker swarm like so: $ dt stack deploy --with-registry-auth -c tmp.stack.docker-compose.yml tmp Creating network tmp_my-network Creating service tmp_my-service $ ...
user avatar
  • 629
3 votes
1 answer
186 views

How to properly manage mupltiple environmental variables with Gitlab CI and Docker Swarm?

In our project we are using Docker and we have multiple services with a pile of environmental variables (mostly credentials to various dbs, mail, samba, 30+ entries in total). It all worked well with ...
user avatar
  • 53
1 vote
2 answers
246 views

Command returns 0.0.0.0 for IP but only for leader

I have a 3 node docker swarm cluster and I am trying to get the IPs of each one via docker node inspect node-1 --format '{{ .Status.Addr }}' but I am having an issue where when the node I am trying ...
user avatar
1 vote
2 answers
953 views

Why `docker stack` needs Docker to run in swarm mode? What are the implications when working on a single node?

I am experimenting with docker stack as a replacement to docker-compose. But I had the following message on my first deploy attempt: sudo docker stack deploy --compose-file stack/app-stack.yml app-...
user avatar
5 votes
2 answers
4k views

Docker stack deploy doesn't pull images

I'm launching through Ansible (just SSH basically) a docker stack deploy, the issue is also true when launching directly from a manager: docker stack deploy --prune --with-registry-auth -c /docker/...
user avatar
  • 211
2 votes
1 answer
83 views

Docker Containers fails to DNS resolve on subnet 10.0.2.0/24

The ultimate problem I am facing is this: [root@527eb70c04c9 my-service]# ping google.com ping: google.com: Name or service not known Inside my container, I can't resolve public domains, although ...
user avatar
  • 629
2 votes
1 answer
42 views

How to create a preemptable docker container?

Is there any way by which I can set a lifetime for a container after that much of time it should be stopped automatically and only awake when someone send a request. I wanted something like ...
user avatar
  • 186
5 votes
1 answer
469 views

Will Docker Swarm work if masters are spread over 3 continents?

I need to deploy a highly available Docker Swarm on Azure. I created a VNet in 3 locations: Brazil South (my location), East US and West Europe. Then I enabled network peering so VMs in these ...
user avatar
3 votes
1 answer
2k views

How to get hostname from node-exporter in Docker Swarm?

I have setup my monitoring with the cadvisor, node-exporter, prometheus, grafana stack in my clustered environment using docker swarm. What is the easiest way to get my actual hostnames picked up by ...
user avatar
  • 343
4 votes
1 answer
4k views

How to fix a "heartbeat failure" in Docker Swarm?

My cluster is currently located in a single data center. I've been trying to change that by adding a single worker node from another data center, but so far it hasn't worked. I'm able to make this ...
user avatar
  • 183
4 votes
1 answer
702 views

How do I prevent service A from being placed in the same node as service B in Docker Swarm?

From the docs, I could only find information about placement restrictions based on node attributes, likes labels and its role. However, I couldn't find how to configure placement based on the services ...
user avatar
  • 183
1 vote
1 answer
237 views

Executing a command in running docker swarm service

I am trying to run a Django project in docker swarm mode. The problem is I want to index the Elastic search container which needs to be run only after postgres completes the SQL dumping process (only ...
user avatar
  • 11
1 vote
1 answer
46 views

Is it ok to logout after calling docker stack deploy?

If I immediately terminate the process that called docker stack deploy will the docker swarm continue? My use case is this: In my CI job I ssh into my swarm cluster node. I copy the new stack.yml ...
user avatar
1 vote
1 answer
422 views

Docker Swarm loop

I have written my own simple docker image. It works fine. Then I created my docker swarm with only two nodes a master and a slave and started a service with the following command: docker service ...
user avatar
  • 113
8 votes
2 answers
6k views

Options to assign a static ip to a service running in docker swarm

Situation: docker swarm with 3+ nodes service running in the swarm with replicas=1 and restart=always swarm hosts have multiple interfaces - one for each vlan, with the same name service is deployed ...
user avatar
  • 183
2 votes
2 answers
1k views

Join a Linux Docker swarm with a local Windows Docker for test purposes

I'm currenlty trying to connect/join a Linux Docker Swarm cluster with my Windows machine in order to test a stack without sending the stack over and over to my test cluster under Linux. My problem is ...
user avatar
  • 213
1 vote
1 answer
1k views

Docker Swarm join-token not working

I am trying to add a new node into my swarm over the internet but it doesn't seem to connect through a proxy. I am trying to proxy using Caddy. The proxy configuration results in the same as for any ...
user avatar
  • 111
1 vote
1 answer
484 views

Error while trying to run docker redis image on Alpine Linux 3.7.0

Specifications Microsoft Windows [Version 10.0.14393] VirtualBox 5.2.8 Alpine Linux Extended 3.7.0 Docker Info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 1 Server Version: 17.10.0-ce ...
user avatar
4 votes
1 answer
117 views

Docker managers are losing quorum on AWS

I have deployed Docker EE on AWS by choosing the package directly from the AWS Marketplace: Docker EE for AWS (Standard/Advanced) - BYOL. The cluster has been successfully launched and deployed on AWS....
user avatar
3 votes
1 answer
8k views

Docker swarm replica stays 0/1 and service stays in status new

I have a problem with my docker swarm. I created a new service with the following command: docker-compose config | docker stack deploy -c - serviceNameX --with-registry-auth The docker-compose file ...
user avatar
  • 176
3 votes
0 answers
3k views

Docker Swarm Service Health Check? [closed]

Docker Swarm provides a nice way to configure container health checks in the Docker file or a stack compose file. Health status of a container can be checked using docker inspect <container> or ...
user avatar
4 votes
2 answers
3k views

Docker MongoDB image - How to specify credentials other than in the compose file?

I'm using this docker image https://hub.docker.com/_/mongo/. That image provides a way of initializing a mongodb root database user with env variables which I can specify in the compose file as ...
user avatar
  • 143
1 vote
1 answer
547 views

Windows Docker in swarm with Linux nodes connection issue

I have the following setup for my docker swarm: three Linux master nodes one Linux slave nodes Windows slave node They are connected with an overlay network. Within the linux nodes everything works ...
user avatar
  • 176
2 votes
2 answers
471 views

Is a decentralized Docker swarm possible?

I want to run services in our office in containers. The problem I have is that we do not have a spare machine available to act as the dedicated host. So I am considering creating a swarm using ...
user avatar
1 vote
2 answers
207 views

Automated Docker swarm reinitialization and token distribution

Imagine you want to reset your Docker swarm from time to time. How do you distribute join tokens to those zillions of nodes? How much automation is possible here?
user avatar