Skip to content

Latest commit

 

History

History
97 lines (64 loc) · 3.85 KB

SetupDockerSwarm.md

File metadata and controls

97 lines (64 loc) · 3.85 KB

Setup Docker Swarm

Install Docker

Using get-docker script

Using the script will get docker-ce-cli and docker-ce (you can uninstall this by apt-get)

# download the install script
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
# in one line
curl -sSL https://get.docker.com | sudo sh

But using this script, it needs to run on interactive terminal (i.e. can't use fabric...) => Solved by setting environment variable DEBIAN_FRONTEND=noninteractive

Using Hypriot distribution

Haven't tried yet

Using HypriotOS

Haven't tried yet

Docker Swarm

Trouble Shooting

Interactive problem when using get-docker script

It seems that the get-docker.sh need some interactive installation?! but in the end it showed "install successfully" but actually have some daemon problem.

Update: message show even after setting environment variable DEBIAN_FRONTEND=noninteractive but it can work anyway.

$ fab install-docker
# Executing docker install script, commit: 2f4ae48

...

debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:

...

If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker your-user

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.
Docker is ready!

Links

Installation Document

Tutorial

The Docker Swarm