

Try adding USER root
before the mkdir.
Also, just in general, when debugging container files, I comment out the failing line and set my command to tail -F /dev/null
, then you can build and run the container and exec <container> bash
and try to manually run the commands that are failing.
Standard operating procedure for high school