Linux Containers | Podman Desktop: Instalación y primeros pasos
Table of Contents
Introduction
This tutorial provides a step-by-step guide on how to install Podman Desktop on Linux and start creating containers. Podman is a powerful tool for managing containers, and knowing how to use it effectively can enhance your development workflow.
Step 1: Install Podman Desktop
-
Update Your System
- Before installing Podman, ensure your package manager is up to date. Open your terminal and run:
sudo apt update sudo apt upgrade
- Before installing Podman, ensure your package manager is up to date. Open your terminal and run:
-
Install Podman
- Install Podman using your package manager. For Debian-based systems, you can use:
sudo apt install podman - For Fedora or Red Hat-based systems, use:
sudo dnf install podman
- Install Podman using your package manager. For Debian-based systems, you can use:
-
Verify Installation
- Check if Podman is installed correctly by running:
podman --version - You should see the installed version of Podman if the installation was successful.
- Check if Podman is installed correctly by running:
Step 2: Setting Up Podman Desktop
-
Install Podman Desktop
- Download the Podman Desktop application from the official website or your distribution's software center.
- Follow the installation prompts to complete the setup.
-
Launch Podman Desktop
- Open the Podman Desktop application from your applications menu.
-
Configure Podman Desktop
- Upon first launch, you may need to configure settings such as the default storage directory and network options. Follow the on-screen instructions to complete the configuration.
Step 3: Create Your First Container
-
Open Terminal
- While you can manage containers through the Podman Desktop GUI, using the terminal is often more flexible.
-
Run a Test Container
- To ensure everything is working, run a simple test container. For example, you can run an Alpine Linux container:
podman run -it alpine /bin/sh - This command pulls the Alpine image (if not already pulled) and opens an interactive shell within the container.
- To ensure everything is working, run a simple test container. For example, you can run an Alpine Linux container:
-
Exit the Container
- Type
exitto leave the container's shell.
- Type
Step 4: Manage Containers
-
List Containers
- To see all running and stopped containers, use:
podman ps -a
- To see all running and stopped containers, use:
-
Remove a Container
- If you need to remove a container, first stop it (if it's running) using:
podman stop <container_id> - Then remove it with:
podman rm <container_id>
- If you need to remove a container, first stop it (if it's running) using:
-
Pull Images
- To pull other images, use:
podman pull <image_name>
- To pull other images, use:
Conclusion
You have successfully installed Podman Desktop on your Linux system and created your first container. By following these steps, you can now explore containerization further, experiment with different images, and manage your containers effectively. As a next step, consider diving deeper into networking and volume management in Podman to expand your containerization skills.