Notifications
Clear all

Effortless Portainer Setup: Launch Your First Docker Container on Ubuntu 24.04

1 Posts
1 Users
0 Reactions
733 Views
(@admin_rgj0igbq)
Posts: 38
Member Admin
Topic starter
 

Managing containers on Linux can seem intimidating, especially if you’re new to Docker. But what if there was a simple, user-friendly way to get started? Enter Portainer—a powerful web-based interface that makes container management a breeze. In this guide, you’ll learn how to install Docker, set up Portainer on Ubuntu 24.04, and launch your very first container—all in just a few steps!


Step 1: Prepare Your System for Docker

Before installing Docker, let’s ensure your system has the necessary certificates and tools:

 
sudo apt-get update sudo apt-get install ca-certificates curl 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

Step 2: Add the Official Docker Repository

Now, let’s add Docker’s official repository so you can install the latest version:

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-get update

Step 3: Install Docker Engine and Related Packages

With the repository set up, install Docker and its essential components:

 

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin


Step 4: Test Your Docker Installation

Let’s verify that Docker is working correctly by running a test container:

sudo docker run hello-world

If you want to run Docker commands without typing sudo each time, add your user to the Docker group (replace jay with your username):

sudo usermod -aG docker $USER

Log out and log back in for this change to take effect.


Step 5: Deploy Portainer for Easy Container Management

First, create a persistent volume for Portainer’s data:

docker volume create portainer_data

Now, launch the Portainer container:

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

Step 6: Access Portainer’s Web Interface

Open your browser and navigate to:

 https://<your-server-ip>:9443 

The first time you visit, you’ll be prompted to create an admin user. Once logged in, you’ll have a powerful dashboard to manage your Docker containers visually.


Bonus: Deploy Your First Container with Portainer

With Portainer up and running, try deploying a container like FreshRSS using the intuitive web interface. Just a few clicks, and you’re set!


Wrapping Up

You’ve just transformed your Ubuntu 24.04 system into a modern container management powerhouse. With Docker and Portainer, deploying and managing applications is easier than ever. Explore, experiment, and enjoy the world of containers—no command-line wizardry required!

 
Posted : 21/06/2025 11:17 pm
Topic Tags
Share: