Code in this video_Install Portainer on Ubuntu

Code in this video_Install Portainer on Ubuntu


docker volume create portainer_data

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

Note

  • -d: Runs the container in detached mode (background)
  • -p 9000:9000: Maps Portainer’s port to your system port 9000
  • –name portainer: Names the container “portainer”
  • –restart=always: Ensures the container auto-restarts on system reboot or failure
  • -v /var/run/docker.sock:/var/run/docker.sock: Allows Portainer to communicate with the Docker Engine
  • -v portainer_data:/data: Mounts the created volume to store persistent Portainer data
  • portainer/portainer-ce:latest: Uses the latest official image of Portainer CE (Community Edition)

Leave a Reply

Your email address will not be published. Required fields are marked *