• May 30, 2023
  • 2 views
  • 0 Comments
# Update the Ubuntu 
sudo apt -y update

# Installing Docker 
sudo apt -y install docker.io

# Installing curl 
sudo apt install -y apt-transport-https ca-certificates curl

# make the keyrings direcotry 
sudo mkdir /etc/apt/keyrings

# make the dockers directory if it does not exist
sudo mkdir /etc/docker

# want to change Docker daemon to use systemd for the management of the container’s cgroups. To do this, run the following command below
sudo mkdir /etc/docker
cat <<EOF | sudo tee /etc/docker/daemon.json
{ "exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts":
{ "max-size": "100m" },
"storage-driver": "overlay2"
}
EOF

# then restart docker services 
sudo systemctl enable docker
sudo systemctl daemon-reload
sudo systemctl restart docker