0

I'm trying to save a database into one container. How can I save my database when I push the container to Dockerhub?

Thanh Kiet
  • 111
  • 1
  • 8
  • Do you mean to save *data* or the *database program* itself? – jurez Sep 11 '20 at 11:09
  • I want to save _data_. Actually, I used pymongo to create "mydatabase" and save it into mongodb container. When I push the container into Dockerhub and pull it in another computer, I use mongo shell to check but there is no 'mydatabase'. – Thanh Kiet Sep 11 '20 at 11:13
  • Docker Hub images never contain _data_; you generally need to distribute or initialize that separately. The linked question describes several ways to do this with MongoDB. – David Maze Sep 11 '20 at 13:26

0 Answers0