Skip to content

Docker

Portainer

To install and update portainer, use the following:

Installation

# This is a one liner
docker run \
  --name portainer \
  --restart=unless-stopped \
  -d -p 8050:8000 -p 9050:9000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data portainer/portainer-ce:latest

Update

First stop and remove the container, and then pull the latest image.

docker stop portainer && \
  docker rm portainer && \
  docker pull portainer/portainer-ce:latest

Then create the new container using the new image.

# This is a one liner
docker run \
  --name portainer \
  --restart=unless-stopped \
  -d -p 8050:8000 -p 9050:9000 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data portainer/portainer-ce:latest

Usage

You can use portainer locally, visiting http://localhost:9050

References

Update Portainer