Microservice from the start may be a lot of overhead, but it should at least be made with that scalability in mind. In practice to me, that just means simple things like make sure you can configure it via environment vars, run it out of docker compose or something because you need to be able install it on all your dev systems and your prod server. That basic setup will let you scale if/when you need to, and doesn’t add anything extra when planned from the start.
Allocating infrastructure on a cloud service with auto scaling is the hard part imo. But making the app support the environment from the start isn’t as hard.
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 andexec bash
and try to manually run the commands that are failing.