The darthjee/django image is a Python 3.12 development image for Django projects, built on top of the official python:3.12.16-slim-bookworm image. Projects are managed with Poetry.
The image does not ship a ready-to-use virtualenv. Instead, its Poetry artifact cache (/home/app/.cache/pypoetry/artifacts) comes pre-populated with the packages most Django projects need, so a project's own poetry install reuses them instead of downloading them again.
Its working directory is /home/app/app, which is owned by the app user (uid 1000), also the image's default user.
poetry — pinned, installed globally with pipdefault-libmysqlclient-dev, build-essential and pkg-config (to build mysqlclient), plus the mysql clientping, telnet, curldjango, django-admin, mysqlclient, gunicorn, jinja2pytest, pytest-django, ruff, radon, xenon, lizardOnly the cached versions are reused; if your project pins different versions, Poetry downloads those as usual.
This image is intended to be used as a base for Django projects. To build on top of it, reference it in your Dockerfile (see the available tags at https://hub.docker.com/r/darthjee/django/tags):
FROM darthjee/django:<version>
COPY --chown=app:app pyproject.toml poetry.lock /home/app/app/
RUN poetry install --no-root
Since the default user is app, Poetry creates the project's virtualenv under /home/app; run commands inside it with poetry run <command>.
The cache is only reused when Poetry runs as app with its default cache directory; mounting a volume over /home/app hides it.
See the LICENSE file for more information.
Content type
Image
Digest
sha256:03937ce38…
Size
208.4 MB
Last updated
17 days ago
docker pull darthjee/django