You're running into this error because the Docker container is trying to create or write to the db.sqlite3
file, but the user it's running as (appuser
) doesn't have permission. This usually happens when you mount your local project directory (.
) into the container (/app
), which overrides the internal folder's permissions. To fix it, you can either run the container as root
, change the permissions of your local folder with chmod -R 777 .
, or make sure the /app
directory inside the container is owned by the right user by using COPY --chown=appuser:appuser . .
and setting write permissions if needed.