I'm trying to install a PHP app on a Azure Linux Web App and one of the prerequisites is Mcrypt.
I am aware that Mcrypt has been superseded by OpenSSL, but like I said it is a prerequisite for the app I am trying to install, so any commentary around this will not be helpful.
To get Mcrypt to work, I need to install the "libmcrypt-dev" package, which is easy enough to do manually with:
apt-get -y install libmcrypt-dev
But I have found after the app is restarted the package disappears. After some rather extensive searching online I managed to find one blog post from Microsoft back in 2017 which described why this happens, and it makes sense, but isn't particularly helpful.
https://blogs.msdn.microsoft.com/waws/2017/09/08/things-you-should-know-web-apps-and-linux/#PersistHome
Files outside of /home are not persisted. The blog post says to install packages via a Dockerfile, and the documentation linked to is again unhelpful. It talks about creating a custom Docker image which seems to be a long and complicated process to achieve
a simple task. There has to be an easier way.
I've tried putting the apt-get command above in the Stack Settings Startup Command to do the install on container startup, but that resulted in a ":( Application Error". Interestingly the diagnostics suggested the package was installing before
the container restarted again without reason, possibly due to a startup timeout.
Could anyone suggest how I could get libmcrypt-dev to install and persist?
MrGoodBytes