I have a project running on a host using docker compose.

Can anyone advise me on how can I move the docker-compose containers to another host?


You would bring the containers up on the new host by running the same "docker compose up -d" command you used on the current host to get things running.

This would pull the images and run the containers in the exact same way they run on your current host, creating the same networks etc.

Please note that any data within the containers would not be transferred to your new host. You would have to copy this over manually. This is not an issue if your containers aren't using volumes and/or you don't need to keep the ephemeral data in the current containers.

  • 1
    Hi, thanks for the answer. I executed manual steps like "docker commit" and on the other host when I start the docker-compose up I'm losing data. How can i use "docker-compose start" to resume stack on the other host?. When i use docker-compse start i get "error no containter found". – Rama Krishna S Sep 27 '18 at 9:19
  • 2
    I resolved this issue. by extracting data from the existing container and restored in the other container. – Rama Krishna S Sep 28 '18 at 9:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.