[{"data":1,"prerenderedAt":352},["Reactive",2],{"content-query-Xc1Z3618Fo":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"head":10,"layout":12,"body":13,"_type":347,"_id":348,"_source":349,"_file":350,"_extension":351},"/docs/getting-started/upgrade-guide","getting-started",false,"","Upgrading","Learn how the serversideup/php Docker images are built and how to upgrade.",{"title":11},"Upgrade Guide - Docker PHP - Server Side Up","docs",{"type":14,"children":15,"toc":342},"root",[16,24,30,35,80,100,107,120,136,142,155,160,244,249,307,313,327,336],{"type":17,"tag":18,"props":19,"children":21},"element","h1",{"id":20},"upgrading",[22],{"type":23,"value":8},"text",{"type":17,"tag":25,"props":26,"children":27},"p",{},[28],{"type":23,"value":29},"If you do not select a specific patch version, then you will receive automatic PHP updates.",{"type":17,"tag":25,"props":31,"children":32},{},[33],{"type":23,"value":34},"For example, you can select your version based on the different version numbers:",{"type":17,"tag":36,"props":37,"children":38},"ul",{},[39,54,67],{"type":17,"tag":40,"props":41,"children":42},"li",{},[43,45,52],{"type":23,"value":44},"Major Version (example: ",{"type":17,"tag":46,"props":47,"children":49},"code",{"className":48},[],[50],{"type":23,"value":51},"8",{"type":23,"value":53}," will give you the latest 8.x version)",{"type":17,"tag":40,"props":55,"children":56},{},[57,59,65],{"type":23,"value":58},"Minor Version (example: ",{"type":17,"tag":46,"props":60,"children":62},{"className":61},[],[63],{"type":23,"value":64},"8.3",{"type":23,"value":66}," will give you the latest 8.3.x version)",{"type":17,"tag":40,"props":68,"children":69},{},[70,72,78],{"type":23,"value":71},"Patch Version (example: ",{"type":17,"tag":46,"props":73,"children":75},{"className":74},[],[76],{"type":23,"value":77},"8.3.2",{"type":23,"value":79}," will always stay at the 8.3.2 version)",{"type":17,"tag":25,"props":81,"children":82},{},[83,85,91,93,98],{"type":23,"value":84},"If you use ",{"type":17,"tag":46,"props":86,"children":88},{"className":87},[],[89],{"type":23,"value":90},"latest",{"type":23,"value":92},", 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: ",{"type":17,"tag":46,"props":94,"children":96},{"className":95},[],[97],{"type":23,"value":77},{"type":23,"value":99},").",{"type":17,"tag":101,"props":102,"children":104},"h2",{"id":103},"release-process",[105],{"type":23,"value":106},"Release process",{"type":17,"tag":25,"props":108,"children":109},{},[110,112,118],{"type":23,"value":111},"All source code is merged into the ",{"type":17,"tag":46,"props":113,"children":115},{"className":114},[],[116],{"type":23,"value":117},"main",{"type":23,"value":119}," branch, which automatically build our \"beta\" images.",{"type":17,"tag":25,"props":121,"children":122},{},[123,125,134],{"type":23,"value":124},"After testing the images internally and from other community members, we will ",{"type":17,"tag":126,"props":127,"children":131},"a",{"href":128,"rel":129},"https://github.com/serversideup/docker-php/releases",[130],"nofollow",[132],{"type":23,"value":133},"publish a release on GitHub",{"type":23,"value":135}," with a detailed changelog.",{"type":17,"tag":101,"props":137,"children":139},{"id":138},"updating-the-docker-images-on-your-own",[140],{"type":23,"value":141},"Updating the Docker images on your own",{"type":17,"tag":25,"props":143,"children":144},{},[145,147,153],{"type":23,"value":146},"If you You and simply run ",{"type":17,"tag":46,"props":148,"children":150},{"className":149},[],[151],{"type":23,"value":152},"apt-get update && apt-get upgrade",{"type":23,"value":154}," 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.",{"type":17,"tag":25,"props":156,"children":157},{},[158],{"type":23,"value":159},"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.",{"type":17,"tag":161,"props":162,"children":164},"code-panel",{"label":163},"Example Dockerfile with manual updates for Debian",[165],{"type":17,"tag":166,"props":167,"children":171},"pre",{"className":168,"code":169,"language":170,"meta":7,"style":7},"language-dockerfile shiki shiki-themes github-dark github-dark monokai","FROM serversideup/php:8.3.2-fpm-nginx\n\nRUN apt-get update \\\n    && apt-get upgrade -y \\\n    && apt-get clean \\\n    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*\n","dockerfile",[172],{"type":17,"tag":46,"props":173,"children":174},{"__ignoreMap":7},[175,193,203,217,226,235],{"type":17,"tag":176,"props":177,"children":180},"span",{"class":178,"line":179},"line",1,[181,187],{"type":17,"tag":176,"props":182,"children":184},{"style":183},"--shiki-default:#F97583;--shiki-dark:#F97583;--shiki-sepia:#F92672",[185],{"type":23,"value":186},"FROM",{"type":17,"tag":176,"props":188,"children":190},{"style":189},"--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2",[191],{"type":23,"value":192}," serversideup/php:8.3.2-fpm-nginx\n",{"type":17,"tag":176,"props":194,"children":196},{"class":178,"line":195},2,[197],{"type":17,"tag":176,"props":198,"children":200},{"emptyLinePlaceholder":199},true,[201],{"type":23,"value":202},"\n",{"type":17,"tag":176,"props":204,"children":206},{"class":178,"line":205},3,[207,212],{"type":17,"tag":176,"props":208,"children":209},{"style":183},[210],{"type":23,"value":211},"RUN",{"type":17,"tag":176,"props":213,"children":214},{"style":189},[215],{"type":23,"value":216}," apt-get update \\\n",{"type":17,"tag":176,"props":218,"children":220},{"class":178,"line":219},4,[221],{"type":17,"tag":176,"props":222,"children":223},{"style":189},[224],{"type":23,"value":225},"    && apt-get upgrade -y \\\n",{"type":17,"tag":176,"props":227,"children":229},{"class":178,"line":228},5,[230],{"type":17,"tag":176,"props":231,"children":232},{"style":189},[233],{"type":23,"value":234},"    && apt-get clean \\\n",{"type":17,"tag":176,"props":236,"children":238},{"class":178,"line":237},6,[239],{"type":17,"tag":176,"props":240,"children":241},{"style":189},[242],{"type":23,"value":243},"    && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*\n",{"type":17,"tag":25,"props":245,"children":246},{},[247],{"type":23,"value":248},"If you're running an Alpine-based image, you can use the following commands:",{"type":17,"tag":161,"props":250,"children":252},{"label":251},"Example Dockerfile with manual updates for Alpine",[253],{"type":17,"tag":166,"props":254,"children":256},{"className":168,"code":255,"language":170,"meta":7,"style":7},"FROM serversideup/php:8.3.2-fpm-nginx-alpine\n\nRUN apk update \\\n    && apk upgrade \\\n    && rm -rf /var/cache/apk/*\n",[257],{"type":17,"tag":46,"props":258,"children":259},{"__ignoreMap":7},[260,272,279,291,299],{"type":17,"tag":176,"props":261,"children":262},{"class":178,"line":179},[263,267],{"type":17,"tag":176,"props":264,"children":265},{"style":183},[266],{"type":23,"value":186},{"type":17,"tag":176,"props":268,"children":269},{"style":189},[270],{"type":23,"value":271}," serversideup/php:8.3.2-fpm-nginx-alpine\n",{"type":17,"tag":176,"props":273,"children":274},{"class":178,"line":195},[275],{"type":17,"tag":176,"props":276,"children":277},{"emptyLinePlaceholder":199},[278],{"type":23,"value":202},{"type":17,"tag":176,"props":280,"children":281},{"class":178,"line":205},[282,286],{"type":17,"tag":176,"props":283,"children":284},{"style":183},[285],{"type":23,"value":211},{"type":17,"tag":176,"props":287,"children":288},{"style":189},[289],{"type":23,"value":290}," apk update \\\n",{"type":17,"tag":176,"props":292,"children":293},{"class":178,"line":219},[294],{"type":17,"tag":176,"props":295,"children":296},{"style":189},[297],{"type":23,"value":298},"    && apk upgrade \\\n",{"type":17,"tag":176,"props":300,"children":301},{"class":178,"line":228},[302],{"type":17,"tag":176,"props":303,"children":304},{"style":189},[305],{"type":23,"value":306},"    && rm -rf /var/cache/apk/*\n",{"type":17,"tag":101,"props":308,"children":310},{"id":309},"subscribe-to-repository-updates",[311],{"type":23,"value":312},"Subscribe to repository updates",{"type":17,"tag":25,"props":314,"children":315},{},[316,318,325],{"type":23,"value":317},"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 ",{"type":17,"tag":126,"props":319,"children":322},{"href":320,"rel":321},"https://github.com/serversideup/docker-php",[130],[323],{"type":23,"value":324},"GitHub",{"type":23,"value":326},".",{"type":17,"tag":25,"props":328,"children":329},{},[330],{"type":17,"tag":331,"props":332,"children":335},"img",{"alt":333,"src":334},"Watch Repository","/images/docs/watch-repo.png",[],{"type":17,"tag":337,"props":338,"children":339},"style",{},[340],{"type":23,"value":341},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}",{"title":7,"searchDepth":195,"depth":195,"links":343},[344,345,346],{"id":103,"depth":195,"text":106},{"id":138,"depth":195,"text":141},{"id":309,"depth":195,"text":312},"markdown","content:docs:2.getting-started:3.upgrade-guide.md","content","docs/2.getting-started/3.upgrade-guide.md","md",1727889281188]