Based on this guide
We differ from the official docs by creating the btrfs
before installing docker-ce
.
Also we assume this is done as root.
Apperently, we can save ourself the effort to shuffle stuff around afterwards and have docker use the btrfs as intended, immediately after installation.
Size: 2GB RAM/40GB SSD Block Storage: New, 100 GB
apt purge docker docker-engine docker.io
On debian, btrfs is not installed by default yet.
apt install btrfs-progs/stable
mkfs.btrfs /dev/sda
echo '/dev/sda /var/lib/docker btrfs relatime 0 2' >> /etc/fstab
mkdir /var/lib/docker
mount /var/lib/docker
apt update
apt install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
apt-key fingerprint 0EBFCD88
Fingerprint should be 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
Droplet is amd64.
On Debian,
ubuntu
needs to be replaced withdebian
in the next command
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt update
apt install docker-ce
To test:
docker run --rm -ti hello-world