The Dockerfile is used to build a Docker image, which can later be started as a process.
run in Dockerfile can be used to run a temporary command, like apt install to add packages to the image. But you shouldn’t start a continuous service there.
The service could be started in entrypoint, which is executed when the built image is actually started.
I recommend to check one of the many Docker tutorials or the documentation.
Why do you want to change the default database by overwriting the Dockerfile, what do you want to achieve?
it is possible to see the original Dockerfile in the repo (example link) or use docker inspect to see what values are used by the original image.