📜  portainer instal - Shell-Bash (1)

📅  最后修改于: 2023-12-03 14:45:33.698000             🧑  作者: Mango

Portainer Installation Guide

If you are looking for an easy way to manage your Docker containers and images, Portainer is a great option. In this guide, we will walk you through the steps to install Portainer on your system using a Shell/Bash command.

Prerequisites

Before installing Portainer, you will need the following:

  • A Linux or Windows system with Docker installed
  • A Bash or Shell terminal
  • Basic knowledge of Docker
Installation Steps
  1. Open your terminal and run the following command to pull the latest Portainer image:

    docker pull portainer/portainer-ce
    

    This command will download the Portainer image to your system.

  2. Next, use the following command to create a new Portainer container:

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

    This command will create a new Portainer container with the specified name, ports, and volumes. The --restart=always option will ensure that the container starts automatically if the system is rebooted.

  3. Once the container is up and running, open a web browser and navigate to http://localhost:9000. You should see the Portainer login page.

  4. Create a new admin account or login with an existing one.

  5. From here, you can start managing your existing Docker containers and images, as well as create new ones.

Conclusion

Installing Portainer on your system using a Shell/Bash command is a quick and easy process. With Portainer, you can easily manage your Docker containers and images through a simple and intuitive web interface.