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
0 answers
7 views

Ensuring Ubuntu docker image will not kill the process under heavy load

We run our app as a daemon (or some times with nohup command) so that Ubuntu will not kill this process under heavy processor and memory load. However, we want to dockerize (on Ubuntu 20.04 docker ...
RajS's user avatar
  • 141
0 votes
1 answer
40 views

How is memory and storage shared between tasks running stateful applications?

I've been reasearching docker swarms and found out that a swarm is a collection of nodes, nodes are computers that run services, services are schedulers of tasks, and tasks are running containers. ...
marcosdly's user avatar
0 votes
0 answers
24 views

Deploy to external docker swarm

I have a Jenkinsfile in which I build a docker image and push it to an external private registry. If I were to manually update my docker swarm, I would do this: docker use <context> docker ...
user1406177's user avatar
0 votes
0 answers
31 views

Selfhosted GitLab and Docker Swarm: How does Docker Swarm update images automatically?

I'm using Docker Swarm for container orchestration on a unbuntu server and for the past few months I have been running into a weird problem. To preface: I didn't set up the system, just took it over. ...
duhrstig's user avatar
2 votes
1 answer
761 views

How do I get real client IP inside docker container for logging to the database

I have a following docker compose file: version: "3.8" services: postgres: image: postgres:11 volumes: - myapp_postgres_volume:/var/lib/postgresql/data ...
RajS's user avatar
  • 141
1 vote
0 answers
43 views

Dockerfile & Docker compose for deploying a webpage with HTML and CSS at frontend and Nodejs and MongoDB at backend using Apache at EC2 [closed]

I need to deploy this application on EC2 instance using APACHE please suggest me docker compose and Docker file for this project in Github Project Backend is on Nodejs and Mongo Frontend is in HTML,...
Deepjyoti Bhattacharjee's user avatar
0 votes
0 answers
93 views

How can host-machines in a Swarm ping containers running on different hosts?

Consider the following scenario. I have a Docker swarm with 2 nodes, 1 manager and 1 worker. An overlay network has been created on the manager and a group of standalone containers have been attached ...
Limmen's user avatar
  • 101
0 votes
1 answer
148 views

Using docker-swarm with Jenkins

I have a cluster which is being used as a docker swarm - 1 manager, and 4 workers. The manager node is a pure manager node, set via docker node update --availability drain <manager-id> The ...
Ufder's user avatar
  • 101
0 votes
1 answer
468 views

How to update Docker Swarm services all at once?

I have a Docker Swarm with three services: proxy, backend, frontend. Currently it seems that if I do docker stack deploy and one service fails, it might just rollback to the previous version while the ...
Emily's user avatar
  • 101
0 votes
0 answers
324 views

Docker swarm sending DNS queries about its containers

I have docker swarm cluster with few services running in containers. My company is experiencing DNS issues, so I have ran tcpdump -i ens18 port 53 to capture and analyze DNS traffic. In output I ...
DJ83's user avatar
  • 1
0 votes
1 answer
583 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 ...
vpseg's user avatar
  • 11
0 votes
1 answer
190 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&...
CodeWeed's user avatar
  • 139
2 votes
1 answer
2k 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 ...
Олег's user avatar
1 vote
2 answers
71 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?
Evan Carroll's user avatar
  • 1,794
1 vote
1 answer
1k 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 ...
Chang Zhao's user avatar
0 votes
1 answer
66 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 ?
Krishna Torque's user avatar
0 votes
1 answer
557 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 ...
Chang Zhao's user avatar
1 vote
1 answer
377 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 ...
ParisNakitaKejser's user avatar
2 votes
0 answers
357 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....
pagislav's user avatar
  • 121
1 vote
1 answer
508 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 "...
Worp's user avatar
  • 679
0 votes
1 answer
194 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 ...
tyluRp's user avatar
  • 101
1 vote
1 answer
263 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 ...
Dilpreet Juneja's user avatar
1 vote
3 answers
4k 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 ...
therobyouknow's user avatar
1 vote
1 answer
1k 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 ...
D. Weber's user avatar
  • 121
0 votes
1 answer
40 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 ...
Nicholas Saunders's user avatar
1 vote
0 answers
34 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", "...
executable's user avatar
1 vote
1 answer
27 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 ...
AJ_4real's user avatar
3 votes
0 answers
37 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 ...
dnk8n's user avatar
  • 183
2 votes
2 answers
3k 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 ...
Cocowalla's user avatar
  • 153
2 votes
3 answers
406 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 ...
Dodzi Dzakuma's user avatar
2 votes
1 answer
184 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 ...
Paul's user avatar
  • 121
4 votes
2 answers
2k 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 ...
DannyB's user avatar
  • 141
1 vote
1 answer
7k 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 $ ...
Worp's user avatar
  • 679
3 votes
1 answer
286 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 ...
ahtohio's user avatar
  • 53
1 vote
2 answers
430 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
1k 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-...
Sylvain Leroux's user avatar
5 votes
2 answers
5k 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/...
jayooin's user avatar
  • 211
2 votes
1 answer
98 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 ...
Worp's user avatar
  • 679
2 votes
1 answer
45 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 ...
SkyRar's user avatar
  • 186
5 votes
1 answer
715 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 ...
Igor Gatis's user avatar
3 votes
1 answer
3k 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 ...
Max N.'s user avatar
  • 403
4 votes
1 answer
6k 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 ...
ivarec's user avatar
  • 183
4 votes
1 answer
1k 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 ...
ivarec's user avatar
  • 183
1 vote
1 answer
321 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 ...
Bikram's user avatar
  • 11
1 vote
1 answer
59 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 ...
Andriy Drozdyuk's user avatar
1 vote
1 answer
549 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 ...
Briomkez's user avatar
  • 113
9 votes
2 answers
8k 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 ...
vlad b.'s user avatar
  • 193
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 ...
Paul Rey's user avatar
  • 223
1 vote
1 answer
2k 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 ...
X0r0N's user avatar
  • 111
1 vote
1 answer
674 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 ...
Soham Dasgupta's user avatar