docker-compose , PermissionError: [Errno 13] Permission denied: '/manage.py'

In your dockerfile, you are pointing to a new user dockuser.

RUN adduser -D dockuser
USER dockuser

Hence your container will start with user dockuser which don't seems to have proper permissions to run /manage.py.

You can either

  • remove the above mentioned lines where you creates and point to dockuser.

OR

  • provide appropriate permission to user dockuser using chown and chmod commands in your dockerfile for /manage.py file.

I have answered such similar question here.


add this to your Dockerfile after RUN adduser -D dockuser:

RUN chown dockuser:dockuser -R /app/

and why you COPYthe files if you already mount them ?

if you want to keep the mount , you need to add rw persmission on the folder on the HOST system not on the Container