hey docker guru’s, I am new to docker and trying my hardest to learn, I have googled this issue but can not find a fix.
I am trying to add log rotation but docker engine will not restart fails every time, any help would be awesome.
OS: Ubuntu 22.04.4 server
Docker engine, followed docker docks to install for the apt install method.
sudo nano /etc/docker/daemon.json
{
"runtimes": {
"nvidia": {
"args": [],
"path": "nvidia-container-runtime"
}
}
"log-driver": "json-file",
"log-opts": {
"max-size": "20m",
"max-file":"5"
}
}
Even if I just use the bellow it fails (fresh docker engine install from the docs)
{
"log-driver": "json-file",
"log-opts": {
"max-size": "20m",
"max-file": "5",
"compress": "true"
}
}
sudo systemctl restart docker
Job for docker.service failed because the control process exited with error code.
See “systemctl status docker.service” and “journalctl -xeu docker.service” for details.
journalctl -xeu docker.service
Sep 07 08:53:36 exorde systemd[1]: Failed to start Docker Application Container Engine.
░░ Subject: A start job for unit docker.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit docker.service has finished with a failure.
░░
░░ The job identifier is 19533 and the job result is failed.
any ideas and help would be awesome.