This is my Dockerfile.template
...
CMD python3 manage.py makemigrations --noinput
CMD python3 manage.py migrate --noinput
CMD python3 manage.py runserver 0.0.0.0:8000
...
But for some reasons the application goes straight into serving
I'm running the docker container like so:
docker run -t --rm -p 8000:8000 {myimage}
I found this behavior to be strange so I decided to hop in
docker exec -it d2836730ae55 bash
python3 manage.py makemigrations --noinput
python3 manage.py migrate --noinput
And this runs fine, so it seems like docker run
somehow is skipping the other commands. What am I doing wrong?