skip to Main Content

I created a new named container for Memgraph Platform with:

docker run -ti -p 3000:3000 -p 7687:7687 -p 7444:7444 --name graph-assignment-7 memgraph/memgraph-platform:latest

I control the container using docker stop graph-assignment-7 and docker start graph-assignment-7. I do this to avoid data loss.

My question relates to how Docker handles image updates? I’m curious about what occurs to my running container when a new image tagged as latest is released for memgraph/memgraph-platform. Will my container automatically transition to this latest version, or do I need to manually intervene by pulling/blocking the new image and recreating the container? I actually want to prevent Docker container from being updated to the new version of Memgraph Platform.

I can’t post images due to message that I get (You need at least 10 reputation to post images.) but I hope that this link will work -> https://phpout.com/wp-content/uploads/2023/10/VZqhK.png

2

Answers


  1. If you would run ‘start’ for already created docker container, it doesn’t do the transition to the latest version.
    But when you will run ‘run’, it does the transition to the latest version.

    Login or Signup to reply.
  2. Docker doesn’t update your running containers automaticially. It also doesn’t pull new versions of an image automatically.

    To update a container, you need to kill it, pull the new image and run the image. I.e.

    docker kill graph-assignment-7
    docker rm graph-assignment-7
    docker pull memgraph/memgraph-platform:latest
    docker run -ti -p 3000:3000 -p 7687:7687 -p 7444:7444 --name graph-assignment-7 memgraph/memgraph-platform:latest
    

    If you don’t do the docker pull, docker will run the image that is known as latest on your machine. That might not be the one that is latest on Docker Hub.

    You can get docker run to check for a newer version and pull it by adding the --pull=always option on docker run. The default is --pull=missing which only pulls the image if it is missing on your local machine. More info here: https://docs.docker.com/engine/reference/commandline/run/#pull

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search