Docker 20.10.0-beta1 install ubuntu 20.04

Docker 20.10.0-beta1 install ubuntu 20.04

Docker 20.10.0 beta is available now. Change log is here

For install on ubuntu execute this.

apt-get update
apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) test"
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io

Create docker config with default network,default-shm-size

if [[ ! -f "/etc/docker/daemon.json" ]];then
cat << OEF> /etc/docker/daemon.json
{
  "data-root": "/var/lib/docker",
  "default-shm-size": "128M",
  "metrics-addr": "127.0.0.1:9323",
  "experimental": true,
  "default-address-pools":
  [
    {
     "base":"172.22.0.0/16",
     "size":24
    }
  ]
}
OEF
fi

Reload daemon’s.

systemctl daemon-reload ; systemctl restart docker
systemctl unmask docker;systemctl enable docker

See docker status

docker info

file

Add swap limit support for docker

if [[ ! -f "/etc/default/grub.d/50-cloudimg-settings.cfg" ]];then
cat << OEF > /etc/default/grub.d/50-cloudimg-settings.cfg
GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0 cgroup_enable=memory swapaccount=1"
OEF
update-grub
fi

Reboot vm.

PROFIT!!!

How add nodes workers and managers see here

Добавить комментарий

Ваш адрес email не будет опубликован.

 

Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.