Follow these steps to install & update Docker / Compose on a Debian server. Based off the Install Docker Engine on Debian documentation.
root
or a sudo
-capable user accountFor a fresh Docker and Docker Compose install, follow the Install Docker Engine on Debian documentation from Docker.
It is strongly recommended to complete these steps after installation to configure the Linux host machine to interface better with Docker.
The default logging driver, json-file
, writes log data to JSON-formatted files on the host filesystem. Over time, these log files expand in size, leading to potential exhaustion of disk resources. We are going to configure this driver to rotate the logs when they grow too large.
sudo nano /etc/docker/daemon.json
{ "log-driver": "json-file", "log-opts": { "max-size": "10m", "max-file": "3" } }
sudo systemctl restart docker