Install Docker and Docker Compose
Before you start, make sure that all packages on your Linux system are up-to-date. Then open a new terminal window.
Docker Compose is an easy way of managing Docker containers, so it makes sense that you will need to install Docker first. The exact command varies depending on your distro.
If you’re using Debian or Ubuntu:
For installation on Fedora:
If you use Arch (BTW):
Docker is now installed on your system. Start and enable it with:
Now add your user to the docker group:
Your membership in the docker group won’t take effect immediately. You’ll need to log out and then log back in again before your user can use Docker without using sudo.
Installing Docker Compose is just as simple.
For Fedora:
On Debian and its derivatives:
Arch Linux users can run:
That’s all there is to it. You now have both Docker and Docker Compose installed on your Linux PC or server, and are ready to run projects such as PiGallery2—a directory-first web-facing image gallery, designed for the Raspberry Pi, but suitable for any Linux setup.
Learn to Use Docker Compose
Docker and Docker Compose offer a super-simple solution for downloading and running thousands of different projects together with all their dependencies. Although Docker Compose is often used for web-facing projects, there are plenty of local projects you can do, too.
Make sure you learn all the Docker Compose commands so that you can deploy them properly.