Docker Community Forums

Share and learn in the Docker community.

Python code with sqlite3 file, saving changes to the db

Docker version: Docker Desktop 4.3.2 (72729)
Ubuntu: 20.04
Python: 3.7
I want to populate a sqlite3 db with scraped data. I have a data.db file in the image, I want to persist the changes in the data.db file. Also, I have a text file where I have saved the indices of the urls, I want to update them with ever run too. The code works fine in Jupyter Notebook but I want to dockerize it and deploy on kubernetes. What should I do? Please reply

Did you follow Though not Python, the basics in that tutorial are the same.

1 Like

Thanks the issue was resolved by using volumes.