How does dockercomposition migrate the startup directory

  docker, question

I have a docker-compose.yml file in directory A, then I start the container with docker-compose up, and then I want to migrate the Docker Compose to directory B for management. What should I do?

I am a beginner of Docker and do not understand the principle of Docker Compose very well. Because this docker-compose project contains important data, I am afraid of data loss during migration. When I searched for the word “Docker Compose Migration”, I basically taught docker save and docker export to back up images and containers, but did not teach how to migrate Docker Compose projects. However, when reading the article, I also mentioned the concept of container volume, which means that the data volume is independent of the mirror and the container and has its own life cycle. It is necessary to mount the backup data volume after restoring the backup container. Perhaps my understanding is not very correct, does it take such a long time to migrate the Docker Compose project?

I just operate in this machine and change a directory for docker-compose, but I can’t find relevant tutorials on the Internet. It’s definitely useless to simply move docker-compose.yml files. The documents on the official websitehttps://docs.docker.com/compo …Also didn’t see any clue. Is it because I think it is too complicated?

The path of build and the path of volumes are relative paths, if so, just change them