[Fixed]-Django + Docker + SQLite3 How to mount database to the container?

4πŸ‘

βœ…

  1. BASE_DIR will be the folder of the settings file, which generally is in a folder at the root. So likely you have a directory issue. If you can move the file directly into the same folder as the settings.py you can at least eliminate those variables.
  2. You won’t see a container, its just binding a volume, which you should also make unique so don’t nest it like you have /code/db.sqlite3 but put it in its own folder then you can reference that in your settings file. You could see list of volumes using docker volume ls (assumes Docker 1.8+)
πŸ‘€stormlifter

Leave a comment