To install the community edition, add the GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Add the docker repository
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"sudo apt-get update
To make sure, you're going to install docker from Docker repo,
apt-cache policy docker-ce
Now install docker,
sudo apt-get install -y docker-ce
It would be running by default, but you can check the status
sudo systemctl status docker