Created
February 23, 2022 13:14
-
-
Save kpavlovsky/de3289ff3f0d34ff3e7dbf9eab4150d5 to your computer and use it in GitHub Desktop.
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 python:3.10.1-bullseye | |
SHELL ["/bin/bash", "-c"] | |
ENV PIP_NO_CACHE_DIR off | |
ENV PIP_DISABLE_PIP_VERSION_CHECK on | |
ENV PYTHONUNBUFFERED 1 | |
ENV PYTHONDONTWRITEBYTECODE 0 | |
RUN apt-get update \ | |
&& apt-get install -y --force-yes \ | |
nano python3-pip gettext chrpath libssl-dev libxft-dev \ | |
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev\ | |
&& rm -rf /var/lib/apt/lists/* | |
WORKDIR /code/ | |
COPY ./code/requirements.txt /code/ | |
RUN pip install -r requirements.txt | |
COPY ./code/ /code/ | |
COPY ./env/ /env/ | |
RUN source /env/envs_export.sh && export && if [ -f "manage.py" ]; then if [ "$DISABLE_COLLECTSTATIC" == "1" ]; then echo "collect static disabled"; else echo "Found manage.py, running collectstatic" && python manage.py collectstatic --noinput; fi; else echo "No manage.py found. Skipping collectstatic."; fi; | |
RUN source /env/envs_export.sh && if [ -n "$BUILD_COMMAND" ]; then eval $BUILD_COMMAND; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment