How to Install Docker on Slax OS

Project Description

Document a procedure to install Docker (community edition) and docker-compose in Slax OS.

Environment


As Slax 9.7.0 is based on Debian, the installation procedure for Docker and docker-compose is similar, with a few changes. Let's start with Debian.


Installing Docker on Debian

According to https://docs.docker.com/install/linux/docker-ce/debian/#install-from-a-package "You can download the .deb file for your release and install it manually. Go to https://download.docker.com/linux/debian/dists/, choose your Debian version, browse to pool/stable/, choose amd64, armhf, or arm64 and download the .deb file for the Docker CE version you want to install." For my situation, I downloaded from https://download.docker.com/linux/debian/dists/stretch/pool/stable/amd64/ the following 3 files: ontainerd.io_1.2.2-1_amd64.deb, docker-ce-cli_18.09.1~3-0~debian-stretch_amd64.deb, and docker-ce_18.09.1~3-0~debian-stretch_amd64.deb.

$ cd /tmp
$ wget https://download.docker.com/linux/debian/dists/stretch/pool/stable/amd64/containerd.io_1.2.2-1_amd64.deb
$ wget https://download.docker.com/linux/debian/dists/stretch/pool/stable/amd64/docker-ce-cli_18.09.1~3-0~debian-stretch_amd64.deb
$ wget https://download.docker.com/linux/debian/dists/stretch/pool/stable/amd64/docker-ce_18.09.1~3-0~debian-stretch_amd64.deb

Then installed them as so (as root):

# dpkg -i /path/package_name

or:

# dpkg -i /tmp/containerd.io_1.2.2-1_amd64.deb
# dpkg -i /tmp/docker-ce-cli_18.09.1~3-0~debian-stretch_amd64.deb
# dpkg -i /tmp/docker-ce_18.09.1~3-0~debian-stretch_amd64.deb

Check if Docker is now running and its version:

$ docker --version
Docker version 18.09.1, build 4c52b90
We can now run containers on Debian.


Installing docker-compose on Debian

First, determine version to download by looking at tags at https://github.com/docker/compose/tags

Code below assumes that we download version 1.23.2. Change the version for your situation accordingly.

# wget -O /usr/local/bin/docker-compose "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)"
# chmod +x /usr/local/bin/docker-compose

Now check docker-compose version:

$ docker-compose --version
docker-compose version 1.23.2, build 1110ad01
We can now run container compositions on Debian.


Installing Docker in Slax

Manual installation process is similar to Debian install described above, with some minor changes. Download the same packages:

# cd /tmp
# wget https://download.docker.com/linux/debian/dists/stretch/pool/stable/amd64/containerd.io_1.2.2-1_amd64.deb
# wget https://download.docker.com/linux/debian/dists/stretch/pool/stable/amd64/docker-ce-cli_18.09.1~3-0~debian-stretch_amd64.deb
# wget https://download.docker.com/linux/debian/dists/stretch/pool/stable/amd64/docker-ce_18.09.1~3-0~debian-stretch_amd64.deb

Then install them, but there is an additional dependency on libltdl7:

# dpkg -i /tmp/containerd.io_1.2.2-1_amd64.deb
# apt-get install libltdl7
# dpkg -i /tmp/docker-ce-cli_18.09.1~3-0~debian-stretch_amd64.deb
# dpkg -i /tmp/docker-ce_18.09.1~3-0~debian-stretch_amd64.deb

Check if Docker is now running and its version:

# docker --version
Docker version 18.09.1, build 4c52b90
We can now run containers on Slax OS.


Installing docker-compose in Slax OS

Docker-compose is installed similarly to Debian:

# wget -O /usr/local/bin/docker-compose "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)"
# chmod +x /usr/local/bin/docker-compose

We can now check installed docker-compose version as so:

# docker-compose --version
docker-compose version 1.23.2, build 1110ad01
Now we can bring container compositions up and down in Slax.