---
title: "Comment by Mounir Messelmeni on \"The (near) Perfect Dockerfile for Django Applications\" | Hashnode"
description: "Nice article! I don&#39;t really embrace running makemigrations inside the container and then migrate, if a developer for whatever reason remove a model or a mo"
url: "https://hashnode.com/posts/the-near-perfect-dockerfile-for-django-applications/6267ee833033e09ae73ebfbe/comment/63603c919d2c7c624f6997dd"
---

[Discussion](https://hashnode.com/posts/the-near-perfect-dockerfile-for-django-applications/6267ee833033e09ae73ebfbe)

Comment [The (near) Perfect Dockerfile for Django Applications](https://hashnode.com/posts/the-near-perfect-dockerfile-for-django-applications/6267ee833033e09ae73ebfbe)

[Mounir Messelmeni](https://hashnode.com/@mounir)

[Oct 31, 2022](https://hashnode.com/posts/the-near-perfect-dockerfile-for-django-applications/6267ee833033e09ae73ebfbe/comment/63603c919d2c7c624f6997dd)

Nice article! I don't really embrace running makemigrations inside the container and then migrate, if a developer for whatever reason remove a model or a model field this is going to be destructive! Making migrations should be part of the developer's task and generated migrations files should go into review before deploying a new version of the software. It's a good practice to have `./manage.py makemigrations --check` into your CI step too to avoid forgetting about migrations files. For k8s users, initcontainers or k8s jobs could be a better place to run migrate command (If using ArgoCD presync hooks are even better).
