[PATCH] docs: Clarify docker instructions

Daniel Axtens dja at axtens.net
Mon Feb 13 07:45:47 AEDT 2017


Hi Stephen,

> It's possible to run 'manage.py' commands when using the Docker
> container but this is not documented anywhere. Clarify this.

Good catch. I normally spawn a shell to do that, but the one-liner is
quite handy.

> -    $ docker-compose run --rm web --quick-test
> +    $ docker-compose run web --quick-test

If you are going to not pass --rm, we should probably let people know
that they will occasionally need to run something like:

I do:
  docker rm $(docker ps -a | awk '/Exited/ {print $1}')
or, perhaps more properly, using docker's template system:
  docker rm $(docker ps -a -q -f status=exited)
(I haven't tested the 'proper' form.)

We should also warn people to occasionally clean up dangling images:

  docker rmi $(docker images | awk '/<none>/ {print $1}')
again, probably more properly:
  docker rmi $(docker images -q -f dangling=true)
(Again, proper form untested.)

> +To run specific tox targets or tests, pass arguments to the above:
> +
> +    $ docker-compose run web --quick-tox -e py27-django17 \
> +        patchwork.tests.test_bundles

This is also a good catch for the docs.

Acked-by: Daniel Axtens <dja at axtens.net>

Regards,
Daniel


More information about the Patchwork mailing list