I have Hbase docker container running in dev server. What is the best way to export it to production VM with all data inside.
With the command docker commit
you can create a image from a container, then put the image on your resgistry, and in Production use the command docker run
to run the container with the new image. The new image will have all data inside.
Example:
On dev, get the id of your by docker ps
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ba8a9e9ecd1b Hbase/ex1 "/sbin/my_init" 12 days ago Up About a minute 0.0.0.0:80, 0.0.0.0:80 dev-c
Create a new image from the container
docker commit ba8a9e9ecd1b repo/new-image
Push you new image to registry
docker push repo/new-image
Run the container in Production
docker run -itd repo/new-image