Created
March 23, 2020 20:22
-
-
Save bsolomon1124/55c7a2b7bafd6a84206240012c94b3e8 to your computer and use it in GitHub Desktop.
Minimalistic Dockerfile for testing small Django features & quirks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.8-slim-buster | |
ARG DJANGO_VERSION='3.*' | |
ARG PROJECT_NAME='project' | |
ARG APP_NAME='app' | |
RUN set -ex \ | |
&& python3 -m pip install --upgrade --no-cache-dir pip "Django==${DJANGO_VERSION}" \ | |
&& django-admin startproject ${PROJECT_NAME} \ | |
&& cd ${PROJECT_NAME} || exit 1 \ | |
&& django-admin startapp ${APP_NAME} \ | |
&& python3 manage.py migrate | |
WORKDIR "/$PROJECT_NAME" | |
CMD ["/bin/bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment