Testing Django using Docker

152 views
Skip to first unread message

Andreas Madsack

unread,
Nov 7, 2015, 8:06:00 AM11/7/15
to Django developers (Contributions to Django itself)
Hello,

I did a first version of a Dockerfile for testing using Docker with a Postgresql Docker container.

The readme contains a walkthrough for a fresh digitialocean box (you need 1GB RAM! 512MB and a swap file also works).
On a linux host you can run the testsuite with "sh run.sh".

Should this way of running the tests be integrated in the docs?
And should the Dockerfile and the runscript be in the django tests folder?

Regards,
Andreas

Jani Tiainen

unread,
Nov 9, 2015, 3:04:13 AM11/9/15
to django-d...@googlegroups.com
Hi,

I think you should document this in Wiki at least.

Few additional questions notes:

What's the Docker overhead? (starup/shutdown time)

Could waiting for db container be more robust? Now it's just "random number".

Using docker-compose would be nice to avoid problems with container startup times.
--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/5f4750dd-36c6-4d80-b222-6d203ada2974%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Enrique Paredes

unread,
Nov 9, 2015, 5:22:20 AM11/9/15
to django-d...@googlegroups.com, django-d...@googlegroups.com
There's one good basic example of docker-compose in pydanny's cookiecutter django package, if you need it.


Sent from Mailbox


Anssi Kääriäinen

unread,
Nov 9, 2015, 5:53:03 AM11/9/15
to django-d...@googlegroups.com

There would be huge benefit if we could somewhat easily test against different database and python versions. Right now, if you are faced with "doesn't work on MySQL 5.7" bug, it is a bit complicated to verify such issues if you don't happen to have the version installed.

- Anssi

Reply all
Reply to author
Forward
0 new messages