docker/scripts/start.sh used for setup and start
Some commands in the script are clearly to setup the system such as the creating folders and databases.
The script is executed each time a container is started, not only when the container is started for the first time.
I suppose it might be done this way for convenience to not have to create the (heavy) image each time you have a small change (to the database, for example). In that case it might be useful to add a dummy file or something such that the script can see if it is the first time it is running and skip the steps otherwise.
Alternatively you could make a base image and put these commands in a derived image.