0

We have written an application in PHP that we're about to deploy to Azure that utilizes a few PHP extensions, such as ImageMagick.

Since Azure PHP 8.0 and 8.1 as runtime is now only available on Linux, I would like to know if there is a way to install custom extensions and keep them even after a restart of the app service?

If I'm not mistaken, these instances are pre-defined docker containers and the site will just be assigned a new container pointing to the PHP files in the persistent storage upon restarting, so whatever we may install to the specific instance via SSH will not be persisted. This was at least the outcome of my last attempt.

I'm no expert with docker nor Linux, so any help is appreciated.

2
  • For the extension to persist if the container restarts, we need to create a directory with name ex under the site folder and copy the required extension to the newly created directory. Commented Oct 27, 2022 at 11:15
  • @Daniel Forslund You can add the extensions using pecl in your docker file as mentioned in this blog post Commented Oct 27, 2022 at 11:48

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.