2. Docker Install

2.1. Versions

Rootfull

Docker daemon is running with root privileges

Rootless

Docker daemon is running with user privileges

LTS version

Docker Long Term Support version

Edge version

Docker up-to-date (newest) version

2.2. Rootfull

$ curl https://get.docker.com |sudo sh
$ sudo usermod -aG docker $(whoami)
$ logout

2.3. Rootless

$ sudo apt update
$ sudo apt install -y uidmap
$ curl https://get.docker.com/rootless |sh
$ echo 'export PATH=/home/ubuntu/bin:$PATH' >> ~/.bashrc
$ echo 'export DOCKER_HOST=unix:///run/user/1000/docker.sock' >> ~/.bashrc
$ echo 'net.ipv4.ping_group_range = 0 2147483647' |sudo tee --append /etc/sysctl.conf
$ sudo sysctl --system
$ logout

2.4. Further Reading

2.5. Assignments

  1. Zainstaluj Docker

  2. Czym różni się Docker od Vagrant?