Docker has become one of the easiest ways to manage containerized apps on Linux, Mac and even Windows Machines. Personally, I use docker to self-host a ton of apps at home. I have it running on a couple of Raspberry Pi’s, as well as a windows machine. I wanted to share my installation experience.
Prior to installing Docker
Be sure to run
sudo apt-get update and
sudo apt-get upgrade.
Run the following command:
curl -sSL https://get.docker.com | sh
You are going to want to add the proper permissions to your primary user account to easily run docker commands. To do that, run the following command:
sudo usermod -aG docker YOURUSER
YOURUSER with the name of the user you are logged in as.
Reboot your machine by running:
To keep everything running smoothly, you’ll want to run the following commands to install the following dependencies:
sudo apt-get install libffi-dev libssl-dev
sudo apt-get install -y python python-pip
sudo apt-get remove python-configparser
Docker should be running by this point. Running the following command should pull an image from the Docker Hub and display hello-world on your screen.
docker run hello-world
Install Docker Compose
For more advanced scenarios, you can install Docker Compose to allow you multiple containers that are dependent on each other with a single command:
sudo pip install docker-compose
Now that Docker is running you can explore the Docker Hub to find various containers to run. To get a basic knowledge of how to use Docker, you can read the 25 basic docker commands for beginners.
You can also check out other posts that guide you through installing various other self-hosted applications with Docker.