Is there a way to download the instance or capture the state to be reused later?

Bharani 40 Reputation points
2024-05-24T16:52:41.2433333+00:00

I have a container instance running in Azure - I want to download the instance - how can this be done?

This is an instance which has an web application running which are essentially learning modules and the modules are marked complete as I make progress. I can easily pull a fresh one from the repository and create a new instance, but the progress will be lost

Is there a way to download the instance or capture the state to be reused later?

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
709 questions
0 comments No comments
{count} votes

Accepted answer
  1. v-vvellanki-MSFT 4,920 Reputation points Microsoft Vendor
    2024-05-24T17:46:59.68+00:00

    Hi @Bharani ,

    Thanks for contacting Microsoft Q&A platform.

    Containers are meant to be stateless. I won't recommend storing states in the containers as they can be moved around VMs anytime (which would lead to loss of data).

    There are multiple ways to store the state of the containers. One of the way is to store this information into persistent file system.

    Another way is to store the result of process into some form of database (could be SQL or NoSQL database). Azure does support variety of hosted database solutions also.

    Once these are implemented, it would be easy to see the state of the system and fetch the newer state of the system too. You should be able to connect to database to see the current state and take corrective actions if required too.

    Hope this solves your query.

    Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Marcin Policht 25,675 Reputation points MVP
    2024-05-24T17:09:20.8266667+00:00

    Mount a file share and store the state there

    https://learn.microsoft.com/en-us/azure/container-instances/container-instances-volume-azure-files


    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    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.