I am trying to create a swarm cluster of Raspberry Pi(s). I have installed docker and docker machine in the Raspberry Pi. I intend to make one of the Raspberry Pis to be the Manager node.

When I am executing the command:

 docker swarm init --advertise-addr

It is giving me an error:

docker: 'swarm' is not a docker command.

Am I missing any basic configuration or I haven't installed any necessary package?

I have followed all the instructions from: Docker Documents

Thanks in advance.

2 Answers 2


When you installed docker did you just install the one from the Repos (on raspbian)? The output of docker version would be helpful.

I seem to remember there is old (1.3 or thereabouts) version of docker in the Repos for raspbian which predates swarm.

If you setup docker via the foundations guide it adds newer repos to apt in order to get the latest versions.

You'd then install docker as docker-engine to get a version with swarm.

  • Thanks.. But after I have executed: curl -sSL https://get.docker.com | sh, it is showing me: W: Failed to fetch https://apt.dockerproject.org/repo/dists/raspbian-jessie/main/binary-armhf/Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none Mar 14, 2017 at 15:37
  • You might need to sudo apt-get remove docker docker-engine to remove your old version then sudo apt-get install ca-certificates apt-transport-https before running that script. Those are the steps from the debian instructions docs.docker.com/engine/installation/linux/debian/… on the Docker website.
    – tobyd
    Mar 14, 2017 at 16:13
  • Thanks.. Actually the concern was regarding the "date" in my RPi.. But surely thanks for your help.. Mar 23, 2017 at 18:01

On a Raspberry Pi 3 model B running Raspbian Jessie if you follow these steps to install Docker swarm it will work!

# update and reboot
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo shutdown –r now

# Install Docker
$ curl –sSL https://get.docker.com | sh

# Add pi user to docker group
$ sudo usermod –aG docker pi

# restart to apply usermod changes
$ sudo shutdown –r now

# As pi user, check that Docker is working with the
$ Docker info

# Create swarm 
$ docker swarm init --advertise-addr

My thought is that maybe you have not added your pi user to the docker group.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.