I run a docker instance under Ubuntu server on my local network. This is how I upgrade portainer to the latest version.
Connect to the Ubuntu server via SSH and run the below commands.
1
2
3
4
5
6
7
8
9
10
11
|
# Stop portainer
sudo docker stop portainer
# Remove existing container
sudo docker rm portainer
# Pull the latest portainer-ce image
sudo docker pull portainer/portainer-ce:latest
# Create and start portainer using the latest image.
sudo 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:latest
|
This will upgrade portainer to the latest version. It should again be accessible at http://<<server>>:9000
.