Docker Engine Install
1. Install Docker engine
Follow actual Install Docker Engine on Ubuntu and you can skip current step.
Run command:
docker version
If you got the screen like:
follow Set docker log limit and skipping next commands in the current step.
Else if you got the answer similar to:
Update the apt package index and install packages to allow apt to use a repository over HTTPS:
apt-get update
apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
Add Docker’s official GPG key:
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
Use the following command to set up the repository:
Install Docker Engine:
Check the docker engine was successfully installed through viewing the version:
the result should be like:
2. Set docker log limit
You should set docker log limit: max-size: 2m, max-file 3 (take for example: JSON File logging driver ):
Below used the 'vim' text editor.
Note: If you have issues using this editor please use 'nano' as alternative or install visual shell for your remote machine
Write next log options data inside daemon.json file and save it
restart docker service to apply log limit:
check docker service to apply log limit:
You should get green status if service is OK: