Merge pull request #127 from cduplantis/patch-1

Upgrading from Version <1.24.1
pull/134/head
samdulam 2021-03-26 12:22:11 +13:00 committed by GitHub
commit 7fc5910efa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 102 additions and 86 deletions

View File

@ -1,86 +1,102 @@
# :fontawesome-brands-docker: Upgrade a Standalone Docker Deployment
### Docker Standalone
Assuming you've used our recommended deployment scripts: when upgrading to the latest version of Portainer, use the following commands:
```shell
docker stop portainer
```
```shell
docker rm portainer
```
Those 2 commands will stop and remove the container respectively. Doing this will NOT remove your other applications/containers/etc.
Now that you have stopped and removed the old version of Portainer, you can run this command
```shell
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always --pull=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
```
That will deploy the newest version of Portainer on your system, using the persistent data and upgrade the DB
Now you can go to http://your-server-address:9000 and login. You should notice that the bottom left corner looks different than it did before. There is no more update nag and the version is no longer shown next to the Portainer logo.
### Agent Only Upgrade
When upgrading to the latest version of Portainer Agent, use the following commands:
```shell
docker stop portainer_agent
```
```shell
docker rm portainer_agent
```
Those 2 commands will stop and remove the container respectively. Doing this will NOT remove your other applications/containers/etc.
Now that you have stopped and removed the old version of Portainer Agent, you can run this command
```shell
docker run -d -p 9001:9001 --name portainer_agent --restart=always --pull=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent
```
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md){target=_blank}
# :fontawesome-brands-docker: Upgrade a Standalone Docker Deployment
### Docker Standalone
Assuming you've used our recommended deployment scripts: when upgrading to the latest version of Portainer, use the following commands:
```shell
docker stop portainer
```
```shell
docker rm portainer
```
Those 2 commands will stop and remove the container respectively. Doing this will NOT remove your other applications/containers/etc.
Now that you have stopped and removed the old version of Portainer, you can run this command
```shell
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always --pull=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
```
That will deploy the newest version of Portainer on your system, using the persistent data and upgrade the DB
Now you can go to http://your-server-address:9000 and login. You should notice that the bottom left corner looks different than it did before. There is no more update nag and the version is no longer shown next to the Portainer logo.
#### Upgrading from Version <1.24.1
Upgrades from versions prior to version 1.24.1 require an intermediate upgrade to `portainer/portainer:1.24.1` prior to upgrading to the current release. Similar to the steps above, we stop and remove the container and run the 1.24.1 release of portainer.
```shell
docker stop portainer
docker rm portainer
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always --pull=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer:1.24.1
```
At this point, you are running version 1.24.1 which can be verified by to http://your-server-address:9000, logging in and confirming the version number in the lower left. To complete the upgrade, perform the steps defined in the previous section.
### Agent Only Upgrade
When upgrading to the latest version of Portainer Agent, use the following commands:
```shell
docker stop portainer_agent
```
```shell
docker rm portainer_agent
```
Those 2 commands will stop and remove the container respectively. Doing this will NOT remove your other applications/containers/etc.
Now that you have stopped and removed the old version of Portainer Agent, you can run this command
```shell
docker run -d -p 9001:9001 --name portainer_agent --restart=always --pull=always -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker/volumes:/var/lib/docker/volumes portainer/agent
```
## :material-note-text: Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md){target=_blank}