|
1 | 1 | --- |
2 | | -head.title: 'Migration Guide - Server Side Up' |
3 | | -description: 'Learn how to migrate from serversideup/php images to the latest version.' |
| 2 | +head.title: 'Upgrade Guide - Docker PHP - Server Side Up' |
| 3 | +description: 'Learn how the serversideup/php Docker images are built and how to upgrade.' |
4 | 4 | layout: docs |
5 | | -title: Migration Guide |
| 5 | +title: Upgrade Guide |
6 | 6 | --- |
7 | | -::lead-p |
8 | | -This guide is created to help you migrate from your current serversideup/php images to the latest version. |
9 | | -:: |
10 | 7 |
|
11 | | -## Version 3 → Version 4 |
| 8 | +## Subscribe to repository updates |
| 9 | +Regardless if you are choosing to use automatic updates or manual updates, it is highly advised to subscribe to our releases. You can do this through the "Watch" button on our [GitHub](https://github.com/serversideup/docker-php). |
| 10 | + |
| 11 | +{.max-w-md.w-full.h-auto.mx-auto} |
| 12 | + |
| 13 | +:u-button{to="https://github.com/serversideup/docker-php" target="_blank" label="Subscribe to our Repo" aria-label="Subscribe to our Repo" size="md" color="primary" variant="outline" trailing-icon="i-lucide-arrow-right" class="font-bold ring ring-inset ring-blue-600 text-blue-600 hover:ring-blue-500 hover:text-blue-500"} |
| 14 | + |
| 15 | +## Choosing an image version |
| 16 | + |
| 17 | +If you do not select a specific patch version, then you will receive automatic PHP updates. |
| 18 | + |
| 19 | +For example, you can select your version based on the different version numbers: |
| 20 | +- Major Version (example: `8` will give you the latest 8.x version) |
| 21 | +- Minor Version (example: `8.4` will give you the latest 8.4.x version) |
| 22 | +- Patch Version (example: `8.4.1` will always stay at the 8.4.1 version) |
| 23 | + |
| 24 | +If you use `latest`, you will always get the latest stable version of the CLI variation of PHP. For the best stability in production environments, you may want to pin to a specific patch version (example: `8.4.1`). |
| 25 | + |
| 26 | +If you need help choosing an image, see our guide below. |
| 27 | + |
| 28 | +:u-button{to="/docs/getting-started/choosing-an-image" label="Learn more about choosing an image" aria-label="Learn more about choosing an image" size="md" color="primary" variant="outline" trailing-icon="i-lucide-arrow-right" class="font-bold ring ring-inset ring-blue-600 text-blue-600 hover:ring-blue-500 hover:text-blue-500"} |
| 29 | + |
| 30 | +## Release process |
| 31 | +All source code is merged into the `main` branch, which automatically build our "beta" images. |
| 32 | + |
| 33 | +After testing the images internally and from other community members, we will [publish a release on GitHub](https://github.com/serversideup/docker-php/releases) with a detailed changelog. |
| 34 | + |
| 35 | +## Updating the Docker images on your own |
| 36 | +If you You and simply run `apt-get update && apt-get upgrade` within your own image, but still want the image to receive other operating system updates, you will need to run the following commands on your build. |
| 37 | + |
| 38 | +Any updates that you apply have a risk of breaking other things inside the container. Be sure to have a good testing process in place before applying updates to your production environment. |
| 39 | + |
| 40 | +#### Example Dockerfile with manual updates for Debian |
| 41 | +```dockerfile [Dockerfile] |
| 42 | +FROM serversideup/php:8.4.1-fpm-nginx |
| 43 | + |
| 44 | +RUN apt-get update \ |
| 45 | + && apt-get upgrade -y \ |
| 46 | + && apt-get clean \ |
| 47 | + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* |
| 48 | +``` |
| 49 | + |
| 50 | +If you're running an Alpine-based image, you can use the following commands: |
| 51 | + |
| 52 | +#### Example Dockerfile with manual updates for Alpine |
| 53 | +```dockerfile [Dockerfile] |
| 54 | +FROM serversideup/php:8.4.1-fpm-nginx-alpine |
| 55 | + |
| 56 | +RUN apk update \ |
| 57 | + && apk upgrade \ |
| 58 | + && rm -rf /var/cache/apk/* |
| 59 | +``` |
| 60 | + |
| 61 | +## Version 3 → Version 4 Migration |
12 | 62 | Version 3 to Version 4 is a much easier migration compared to previous versions. There are **no breaking changes**, so you can simply update your image tag to the latest version and take advantage of the new features. |
13 | 63 |
|
14 | 64 | ### New Features in Version 4 |
@@ -67,7 +117,7 @@ services: |
67 | 117 |
|
68 | 118 | That's it! Version 4 is designed to be a smooth, non-breaking upgrade that gives you more flexibility and features when you need them. |
69 | 119 |
|
70 | | -## Version 2 → Version 3 |
| 120 | +## Version 2 → Version 3 Migration |
71 | 121 | If you're an existing user of our v2 images, be sure that your current configurations are NOT set to use the latest images. To do this, you can lock your images into the `v2.2.1` tag. This will ensure that you're not automatically upgraded to the v3 images. |
72 | 122 |
|
73 | 123 | For example, if you are using `8.2-fpm-nginx`, you would change your `compose.yml` file to use the [`v2.2.1`](https://hub.docker.com/r/serversideup/php/tags?page=1&name=2.2.1){target="_blank"} tag: |
@@ -223,3 +273,4 @@ USER www-data |
223 | 273 | #### Deployment |
224 | 274 | - CI/CD with valid tests is always encouraged |
225 | 275 | - After completing all steps above, you're now ready to deploy the new images |
| 276 | + |
0 commit comments