Why Do People Choose Docker? What Is Portainer and How to Install It on Ubuntu 24.04

Giteqa

Greetings, friends!

Are you familiar with that feeling when you try to install some program on a server, and it requires "dependencies" of a specific version? You update one library, and another service breaks immediately, and so you can spend a large amount of time (I once spent about 20 minutes just installing all the dependencies). This is literally the dependency hell that beginners experience.

In the past, we spent hours configuring the environment, but with the advent of Docker, everything changed drastically. Now, software is not a bunch of files scattered around the system, but a neatly packed "box" (container) that works exactly the same everywhere. If you use Docker, you will save yourself a ton of time and nerves, because installing a specific application can take just 5–10 minutes.

Key Takeaways: Why Docker is the Baseline

  • 100% Isolation: Each application lives in its own closed "container." It doesn't see other programs and cannot "break" the system. So, by running an application through Docker, you protect yourself from possible consequences.

  • System Cleanliness: You no longer need to clutter your server with dozens of libraries. Deleted the container — and the system is clean again, just like after a fresh reinstallation.

  • Launch in Seconds: Setting up a complex stack (for example, WordPress + MySQL + Redis) now takes just one command and a couple of seconds.

  • Portability: If you decide to move to another server, you don't need to configure everything from scratch. Just transfer the configuration file and run it.

  • Security: Containers allow you to limit access to resources, which perfectly complements the work with Fail2ban and other security tools.

Docker vs "Manual" Installation: What's the Difference?

Let me give an example that will be understandable even to a beginner. Imagine you are building a house. Manual installation is when you mix concrete right in the living room, put a generator in the bedroom, and run pipes through the closet. If something leaks, the whole house suffers. Docker is a modern hotel. Each guest has their own room with all the amenities. If a faucet bursts in one room, the others won't even notice.

In my own practice, when creating educational videos on server management, I sometimes use Docker to install one application or another. Although in the videos I try to show the most basic installation method (via APT), sometimes I show the installation using Docker. For personal convenience, I use Docker because it significantly reduces the time spent on installation.

Why Do People Choose Docker?

Choosing to use Docker very much helps save time and nerves, and will also greatly help you organize everything on your server. You can easily launch applications and entire ecosystems and manage them without problems. Also, for managing Docker containers, there is a web interface that can be easily installed, and this interface is called Portainer.

How to Install Portainer on Ubuntu 24.04?

To install Portainer, you will first need to install Docker and then Portainer itself. This is done using the following commands:

sudo apt install ca-certificates curl gnupg -y
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
docker volume create portainer_data

docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v portainer_data:/data \
    portainer/portainer-ce:latest 

We made a video on this topic to make it easier for you to complete the installation -

 

FAQ: Briefly About the Main Things

  • Is Docker a virtual machine? No, it is much lighter. Containers use the kernel of the host system, so they consume almost no extra CPU or memory resources.

  • Is it hard to learn? If you have mastered basic Linux commands, you will understand Docker in one evening. It is as simple and friendly for beginners as possible.

  • Do I need Docker for a simple website? Even for a single website, it is useful — backing up and updating containers is many times easier than "bare" software.

Conclusion

Switching to Docker is like switching from a button phone to a modern smartphone. At first, it's unusual, and after a week, you don't understand how you lived without it before. Don't be afraid to experiment, because that is exactly how professionalism is born.

Article Author — Anatolie Cohaniuc