Closed akanoodles closed 4 years ago
What I do is first click the redeploy in portainer and tell it to pull the latest image, this sets up a new container with the correct settings then I use the docker cli to remove the old container and rename and start the new container
root@MyCloudPR4100 # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e250f84c2e02 portainer/portainer "/portainer" 5 months ago Up 3 minutes 0.0.0.0:9000->9000/tcp reverent_tu
root@MyCloudPR4100 # docker stop e250
e250
root@MyCloudPR4100 # docker pull portainer
Using default tag: latest
latest: Pulling from portainer/portainer
d1e017099d17: Already exists
84dbae3c7ec8: Pull complete
Digest: sha256:a16919b3e02323e4bd0a8c5023d6fd569525297b9dc9a028d778cb6e13512be5
Status: Downloaded newer image for portainer/portainer:latest
root@MyCloudPR4100 # docker run -d -p 9000:9000 --restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /shares/Volume_1/Nas_Prog/docker/portainer:/data portainer/portainer
f487c6da9f744051bbbd0ab0d5e198923c95fd7f513cb4851f73a848912c4b6c
Where is "redeploy" in portainer? I'm using portainer and it's running already I'm not doing anything in cmd line
Here is a step by step what I do:
docker rename portainer portainer_old
docker rename <new container id> portainer
docker ps -a
docker start portainer
docker rm portainer_old
Thanks @cmd430 for explaining. I'd suggest to add a docker section to the wiki with a small tutorial. Then we can close this.
How do I update portainer? I cant update the image if the container is already running?