What is the difference between these installation methods? (Ubuntu Server 20.04)

Tags: #<Tag:0x00007fc3fbb04318>

Hi Guys,

I have been looking into Installing HA on Ubuntu Server 20.04 and there seem to be 2 suggested method, can someone please explain what is the difference between them?

Method 1 : [CREDIT]


`sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common`

`curl -fsSL`  [ `https://download.docker.com/linux/ubuntu/gpg` ](https://download.docker.com/linux/ubuntu/gpg)  `| sudo apt-key add -`

`sudo add-apt-repository "deb [arch=amd64]`  [ `https://download.docker.com/linux/ubuntu` ](https://download.docker.com/linux/ubuntu)  `(lsb_release -cs) stable"`

`sudo apt-get update`

`sudo apt-get install docker-ce docker-ce-cli`  [ `containerd.io` ](https://containerd.io/)

`sudo apt install jq`

`sudo curl -sL`  [ `https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh` ](https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh)  `| bash -s`

`docker container ls -a`

Method 2: [CREDIT]

`sudo -i`

`apt-get update`

`apt-get install -y software-properties-common apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat`

`systemctl disable ModemManager`

`systemctl stop ModemManager`

`apt install`  [ `docker.io` ](https://docker.io/)  `-y`

`systemctl enable --now docker`

`usermod -aG docker YOUR_USERNAME`

`curl -sL "` [ `https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh` ](https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh) `" | bash -s`

PS: Seems like both methods are installing docker as root and running it as root, any concern?

Thank you for your help!

The correct way is to install docker-ce, not docker.io.

See the community guide by kanga_who. It is for 18.04, but works for 20.04 too.

2 Likes