---
title: "Discussion on \"The (near) Perfect Dockerfile for Django Applications\" | Hashnode"
description: "Discussion on \"The (near) Perfect Dockerfile for Django Applications\". Prerequisites- This article assumes an intermediate level understanding of Docker and Django based application development.\nDocker has revolutionized software development and has proven to be the nucleus of new-age development practices like CI-CD, d..."
url: "https://hashnode.com/posts/the-near-perfect-dockerfile-for-django-applications/6267ee833033e09ae73ebfbe"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [The (near) Perfect Dockerfile for Django Applications](https://siddharthsahu.com/the-near-perfect-dockerfile-for-django-applications?utm_source=hashnode&utm_medium=feed)

Prerequisites- This article assumes an intermediate level understanding of Docker and Django based application development. Docker has revolutionized software development and has proven to be the nucleus of new-age development practices like CI-CD, d...

Sep 26, 2021 · 10 min read · siddharthsahu.com  
Read the article

-   [#docker](https://hashnode.com/tag/docker)
-   [#django](https://hashnode.com/tag/django)
-   [#python](https://hashnode.com/tag/python)
-   [#devops](https://hashnode.com/tag/devops)
-   [#deployment](https://hashnode.com/tag/deployment)

## Written by

[Siddharth Sahu](https://hashnode.com/@siddharthsahu)

@siddharthsahu

  
[View profile](https://hashnode.com/@siddharthsahu)

I am an Engineering Manager at Trycon who enjoys creating software products. In love with the magic of stories! www.linkedin.com/in/siddharthsahuiiit

## Responses 1

Markdown supported · ⌘↵ to post

[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).
