Questions tagged [docker-swarm]

Docker Swarm is native clustering for Docker. It turns a pool of Docker hosts into a single, virtual host.

Docker Swarm is native clustering for Docker. It turns a pool of Docker hosts into a single, virtual host.

Swarm serves the standard Docker API, so any tool which already communicates with a Docker daemon can use Swarm to transparently scale to multiple hosts: Dokku, Compose, Krane, Flynn, Deis, DockerUI, Shipyard, Drone, Jenkins... and, of course, the Docker client itself.

Like other Docker projects, Swarm follows the "batteries included but removable" principle. It ships with a set of simple scheduling backends out of the box, and as initial development settles, an API will be developed to enable pluggable backends. The goal is to provide a smooth out-of-the-box experience for simple use cases, and allow swapping in more powerful backends, like Mesos, for large scale production deployments.

3165 questions
54
votes
3 answers

What is the difference between docker service and stack?

I am wondering what the difference between such things. They have got almost the same commands and give the same result.
Dmytro Nalyvaiko
  • 1,664
  • 4
  • 16
  • 27
53
votes
4 answers

How to disable docker swarm mode?

I have enabled docker swarm for local testing. Now, whenever trying to deploy using docker-compose up I see the following warning: WARNING: The Docker Engine you're using is running in swarm mode. Compose does not use swarm mode to deploy services…
Datageek
  • 25,977
  • 6
  • 66
  • 70
49
votes
2 answers

Run docker service on HTTPS

Currently, I run a simple docker container by using the following files. DockerFile FROM microsoft/aspnet:4.7.1 WORKDIR /inetpub/wwwroot EXPOSE 80 COPY index.html . docker-compose.yml version: '3.4' services: testapp: image:…
marvelTracker
  • 4,691
  • 3
  • 37
  • 49
48
votes
4 answers

Convert a docker run command into a docker-compose

I want to run this in my Docker Swarm: docker run --rm -it progrium/stress --cpu 2 --io 1 --vm 2 --vm-bytes 128M --timeout 10s so I need a Docker-compose.yml How should I use this docker image in a docker compose and pass those params ?
Juliatzin
  • 18,455
  • 40
  • 166
  • 325
44
votes
2 answers

How to configure autoscaling on docker swarm?

I would like to know how to configure this tool to start with a minimum number of nodes and grow to a maximum number of nodes when it is required. Should I use another tool or can docker swarm solve this for me?
Celso Agra
  • 1,389
  • 2
  • 15
  • 37
43
votes
4 answers

How do you perform a HEALTHCHECK in the Redis Docker image?

Recently, we had an outage due to Redis being unable to write to a file system (not sure why it's Amazon EFS) anyway I noted that there was no actual HEALTHCHECK set up for the Docker service to make sure it is running correctly, Redis is up so I…
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
42
votes
1 answer

docker service update: "image could not be accessed on a registry to record it's digest"

I have an image on Amazon's Elastic Container Registry (ECR) that I want to deploy as a Docker service in my Docker single-node swarm. Currently the service is running an older version of the image's latest tag, but I've since uploaded a newer…
David Elner
  • 5,091
  • 6
  • 33
  • 49
41
votes
5 answers

sudo: docker-machine: command not found

who has ever tried following this tutorial about Docker Swarm? https://docs.docker.com/get-started/part4/ There is a section called : Create a cluster. What I wanted to do was to create a couple of VMs using docker-machine. Since I use ubuntu16.0.4…
CHRIS LEE
  • 776
  • 3
  • 10
  • 20
41
votes
3 answers

docker service replicas remain 0/1

I am trying out docker swarm with 1.12 on my Mac. I started 3 VirtualBox VMs, created a swarm cluster of 3 all fine. docker@redis1:~$ docker node ls ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS 2h1m8equ5w5beetbq3go56ebl redis3 Ready Active…
Samar
  • 525
  • 1
  • 4
  • 8
39
votes
7 answers

docker stack deploy results in "No such image error"

I am using docker swarm and would like to deploy a service with docker-compose. My service uses a custom image called myuser/myrepo:mytag that I successfully deploy to Docker-Hub to a private repository. My docker-compose looks like this: version:…
ice_chrysler
  • 2,633
  • 1
  • 21
  • 27
39
votes
7 answers

How to run my python script on docker?

I am trying to run my python script on docker. I tried different ways to do it but not able to run it on docker. My python script is given below: import os print ('hello') I have already installed docker on my mac. But i want to know how i can…
Pulkit
  • 606
  • 1
  • 9
  • 19
37
votes
2 answers

How is Docker Swarm different than Kubernetes?

I am finding docker swarm, kubernetes quite similar and then there is docker which is a company and the above two are docker clustering tool. So what exactly all these tools are and differences between them?
Abhay Dwivedi
  • 1,500
  • 2
  • 16
  • 22
36
votes
7 answers

Docker prune stuck in "a prune operation is already running"

I run command docker system prune yesterday, it took some time and then my SSH session was disconnected from different reason. Unfortunately I am getting now: Error response from daemon: a prune operation is already running. Obviously there is a…
Martin Mika
  • 581
  • 1
  • 4
  • 12
35
votes
2 answers

"network not manually attachable" when running one-off command against docker swarm network

I'm trying to run a one-off command to initialise a database schema in a new docker swarm which is deployed with 1.13's new support for docker-compose files. The swarm has the following network: $ docker network ls NETWORK ID NAME …
sas
  • 7,017
  • 4
  • 36
  • 50
34
votes
1 answer

HEALTHCHECK: Dockerfile vs docker-compose.yml

We are deploying our services using a Docker Compose file and Docker Swarm. I was wondering if there is any difference between putting the healthcheck inside the Dockerfile or if it is better to put it in the docker-compose.yml. I feel like I've…
kev
  • 8,928
  • 14
  • 61
  • 103