[MSDN Redirect] Azure app services with Linux: installing linux apps through SSH don't persist

SwathiDhanwada-MSFT 18,771 Reputation points
2020-02-17T05:05:31.767+00:00

Hi,

When we connect by SSH from Azure Management Portal to our Linux hosted app service, there is a warning saying "Note: Any data outside '/home' is not persisted".

We need to install some libraries in order for graphics to work on Linux. Currently we are using built-in image, not custom docker image.

Is there a way to persist the installation data (outside 'home' directory) in our current plan? Or a configuration or a command that would keep the installed apps intact next time the app service is restarted?

Thank you

Cem

Source : https://social.msdn.microsoft.com/Forums/en-US/bab19c8e-2d53-4776-b871-d50806aa29b1/azure-app-services-with-linux-installing-linux-apps-through-ssh-dont-persist?forum=windowsazuremanagement

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,879 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. ajkuma 26,471 Reputation points Microsoft Employee
    2020-02-17T19:40:06.86+00:00

    @ Cem, Welcome to Microsoft Q&A! Thanks for posting a good question!

    I understand the scenario you’re dealing with in-built image, but am afraid, as mentioned in this document “Any changes you make outside the /home directory are stored in the container itself and don't persist beyond an app restart.”

    {Just to highlight} However, on Custom container, you can use an app setting called WEBSITES_ENABLE_APP_SERVICE_STORAGE to control whether or not the /home directory of your app is mapped to Azure Storage. If you need files to be persisted in scale operations or across restarts, you should add this app setting and set it to "true". If you don't require file persistence, you can set this app setting to false.

    Furthermore, to use the custom startup script, go to the portal “Application Settings” page and override the StartupFile to /home/site/wwwroot/startupScript.sh and then try calling /bin/init_container.sh based on your requirement.

    Your feedback is highly appreciated, you may always share your feedback on Uservoice (https://feedback.azure.com/forums/169385-web-apps) - All of the feedback you share in these forums will be monitored and reviewed by the Microsoft engineering teams responsible for building Azure.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.