Created
July 29, 2024 20:51
-
-
Save Lauriy/266f732ea64345343b9ed166c6885ffd to your computer and use it in GitHub Desktop.
Django runserver & pytest Dockerfile layer
This file contains 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 base AS development | |
# Django's built-in development server | |
EXPOSE 8000 | |
COPY requirements.test.txt pytest.ini ./ | |
RUN --mount=type=cache,target=/root/.cache/pip pip install --no-cache-dir -r requirements.test.txt \ | |
&& rm -rf requirements.test.txt | |
# We need the main source code to do anything useful | |
COPY rik_proovitöö ./rik_proovitöö | |
# TDD is a thing these days I hear, also allows us to reuse this stage for both 'dev' and 'test' profiles | |
COPY rik_proovitöö_tests ./rik_proovitöö_tests |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment