We have a forum application made of two containers: a container for the database, and another one for the bulletin board application itself. Both containers are running on the same host for quite some time now. That application does not follow the "microservice" architecture since the database files are stored in the writable layer of the database container. And the configuration settings of the forum were directly set up in the writable layer of the bulletin board application.
We would like to migrate that forum to a different host since the current server has reached end-of-life. We see two ways of doing that:
- using
docker commit
to make an image of both containers, then uploading those images to a repository and pulling them back from the new host. - using
docker export
to create archives of the container filesystems, and importing them on the new host.
What are the pro and cons of both approaches for ad-hoc container migration? Is there a better-suited solution for our specific needs?