Problem with restart the container

Farzad Rabiee 1 Reputation point
2021-12-01T04:10:37.627+00:00

Hi, I have a problem with Container Instance that was created on Azure.

Each time I restart the container, it just reset all the data on it.

For example, I installed Vim on it, but after restart, it can't run Vim command.

Do you have any idea how can I fix the issue?

FYI: I am using the gitblit image from Docker Hub.

Thanks

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

4 answers

Sort by: Most helpful
  1. Manu Philip 20,206 Reputation points MVP Volunteer Moderator
    2021-12-01T04:23:44.563+00:00

    When you use docker run to start a container, it actually creates a new container based on the image you have specified. So, if you want to see the changes made, you can restart an existing container. docker ps -a shows you also the ones that have exited. Select the correct container and restart it to see the changes made before the last exit

    1 person found this answer helpful.
    0 comments No comments

  2. Farzad Rabiee 1 Reputation point
    2021-12-06T01:35:54.077+00:00

    Thanks, @Manu Philip for your reply.

    I already pushed the image on the Azure Container Registry and created an Instance from it and can't run docker run or something like that to Azure.

    So your answer doesn't work for me.

    0 comments No comments

  3. Manu Philip 20,206 Reputation points MVP Volunteer Moderator
    2021-12-06T03:09:57.537+00:00

    The continuous deployment can help you solve the situation. Reference here: deploy-ci-cd-custom-container

    0 comments No comments

  4. Farzad Rabiee 1 Reputation point
    2021-12-06T05:51:21.863+00:00

    I changed the default path for Docker Image and built a new image of it.

    Then pushed the new image to Docker Registry and created the Instance with Azure File Share.

    It works, thanks

    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.