Setting up Docker CE

tested on Slackware and Ubuntu

Requirements

Slackware

slackpkg search iptables
slackpkg search git
slackpkg search procps-ng
slackpkg search xz
ls -lF /proc/cgroups

curl https://raw.githubusercontent.com/docker/docker/master/contrib/check-config.sh > check-config.sh
chmod +x check-config.sh
./check-config.sh

Ubuntu

...

Install

grab the latest Docker CE release as binaries

wget https://download.docker.com/linux/static/stable/x86_64/docker-20.10.6.tgz
tar xzf docker-20.10.6.tgz
cp -i docker/* /usr/local/bin/

make the docker commands available to some user

grep docker /etc/group
grep docker /etc/passwd

groupadd docker
usermod -aG docker OPERATOR

Storage

XFS or EXT4 is required for OverlayFS2

here’s a stupid trick to get more space (as a workaround)

mv /var/lib/docker/ /data/docker/
ln -s /data/docker /var/lib/docker

First shot

try and see if there’s any error

/usr/local/bin/dockerd
^C

Ready to go

enable at boot-time (MAYBE ENABLE SYSTEM FIREWALL FOR ONCE)

vi /etc/rc.d/rc.inet1

    echo -n nftables against xenbr0...
    nft -f /etc/nftables.conf && echo done || echo FAIL

echo dockerd already
#echo 1 > /proc/sys/net/ipv4/ip_forward
/usr/local/bin/dockerd > /var/log/dockerd.log 2>&1 &
# --bridge xenbr0
ls -lF /var/run/docker.sock

you can now operate your Docker host

as operator

newgrp docker
docker images -a
docker ps -a
docker pull pbraun9/ubuntu
docker pull pbraun9/devuan

see ops-image and ops

Troubles

seen on slackware

WARN[2021-05-26T20:53:55.272825930+03:00] could not change group /var/run/docker.sock to docker: group docker not found

WARN[2021-05-26T20:53:56.890876251+03:00] Your kernel does not support cgroup blkio weight
WARN[2021-05-26T20:53:56.890946111+03:00] Your kernel does not support cgroup blkio weight_device

seen on ubuntu

WARN[2021-05-27T14:37:12.721995328+03:00] Your kernel does not support CPU realtime scheduler
WARN[2021-05-27T14:37:12.722033328+03:00] Your kernel does not support cgroup blkio weight
WARN[2021-05-27T14:37:12.722039980+03:00] Your kernel does not support cgroup blkio weight_device

TODO

Daemon user namespace optionsđź”— https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-user-namespace-options

rootless-extras https://download.docker.com/linux/static/stable/x86_64/

Resources

Install Docker Engine https://docs.docker.com/engine/install/

Install Docker Engine from binaries https://docs.docker.com/engine/install/binaries/

Post-installation steps for Linux https://docs.docker.com/engine/install/linux-postinstall/

storage

About storage drivers https://docs.docker.com/storage/storagedriver/

init script

How to run dockerd in the background without logs https://stackoverflow.com/questions/54852529/how-to-run-dockerd-in-the-background-without-logs

dockerd https://docs.docker.com/engine/reference/commandline/dockerd/


GUIDES | LECTURES | BENCHMARKS | SMTP HEALTH