Skip to content

Instantly share code, notes, and snippets.

@miclgael
Last active March 2, 2025 00:02
Show Gist options
  • Save miclgael/2a909327069bb5c95c3d818dc5c0ed8b to your computer and use it in GitHub Desktop.
Save miclgael/2a909327069bb5c95c3d818dc5c0ed8b to your computer and use it in GitHub Desktop.
Updating Portainer to latest version

Prev: 2.27.1 New: xxx

💳 These steps taken from this guide.

1. Know current portainer version

Find it in the bottom-left hand corner of the Portainer UI. Update it in the code snippet above, if out of date. Ideally keep all Portainer instances at the same version, for ease of blasting through the steps.

2. List running containers

docker ps | grep portainer

Find the id of the container and copy it to clipboard.

3. Stop and remove the running container for portainer

docker stop d697db420c6b; docker rm d697db420c6b

4. Remove previous image tag

docker rmi portainer/portainer-ce:2.27.1

5. Re-run the initial installer, but bump the version tag to latest on portainer github

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:xxx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment