Site is currently on development mode

Today I Learned – A Brief Intro to Docker for Djangonauts

Last updated 2 years ago by Lacey Williams Henschel


What is Docker?

But first, some frequently asked (by me to my colleagues) questions:

So… what’s Docker?

Glad you asked! Docker helps you run different projects with different dependencies totally separately from each other, without needing to download a bunch of stuff onto your machine that you may never need again.

How is that different from virtualenv?

A virtual environment does some of this. You can use different versions of Python, Django, etc. in different projects when you run each project in its own virtualenv. Docker has the added benefit of isolating your database, caching service like Redis, and other tools as well. For my current project, I’m running a Postgres database and I didn’t have to download Postgres or configure it locally at all!

So do you use Docker alongside virtualenv?

Not quite. You use Docker containers instead of virtual environments. If you’re committed to Docker, you don’t need to worry about virtualenvs anymore. (They can still be useful… but that’s another post.)

Read full Article