So I have been wanting to create a private encrypted messenger service for quite sometime. Originally I was just going to install it on VM as a standalone server behind a Reverse Proxy server. However, that method of install proved to have some strange and quirky issues. I have decided to abandon that approach and use a docker container instead. Hopefully this way will work out better. Before I can get to that point though, I have to get a few prerequisites out of the way first.
The first order of business is to get docker installed. I have chosen to use the official repository over the docker package available from the Ubuntu repository. This will allow me to use the latest version of Docker.
Ubuntu Server: https://ubuntu.com/download/server
sudo apt-get update sudo apt-get upgrade
apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt update
The command “$(lsb_release –cs)” scans and returns the codename of your Ubuntu installation – in this case, Bionic. Also, the final word of the command – stable– is the type of Docker release.
sudo apt-get install docker-ce
If you are looking to install a previous version, we also have an optional method we can use in order to achieve this. Using the Docker Repositories allows us access to these version.
Installing a specific version of Docker (optional) Use this command to list all the previous versions:
apt-cache madison docker-ce
You should see this output or something similar to this:
docker-ce | 5:19.03.1~3-0~ubuntu-bionic | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 5:19.03.0~3-0~ubuntu-bionic | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 5:18.09.8~3-0~ubuntu-bionic | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 5:18.09.7~3-0~ubuntu-bionic | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 5:18.09.6~3-0~ubuntu-bionic | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 5:18.09.5~3-0~ubuntu-bionic | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 5:18.09.4~3-0~ubuntu-bionic | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 5:18.09.3~3-0~ubuntu-bionic | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 5:18.09.2~3-0~ubuntu-bionic | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 5:18.09.1~3-0~ubuntu-bionic | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 5:18.09.0~3-0~ubuntu-bionic | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 18.06.3~ce~3-0~ubuntu | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 18.06.2~ce~3-0~ubuntu | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 18.06.1~ce~3-0~ubuntu | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 18.06.0~ce~3-0~ubuntu | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages docker-ce | 18.03.1~ce~3-0~ubuntu | https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages
sudo apt-get install docker-ce=[version number]
sudo apt-get install docker-ce=18.06.1~ce~3-0~ubuntu
Conclusion:
You now have several different methods to install Docker. There are some great tools to help you manage your Docker Containers. Check out my blog on portainer and look for my instructional videos coming soon!