9a67710ec3
orchestra: 1.28GB -> 848MB musician: 497MB -> 169MB
32 lines
791 B
Docker
32 lines
791 B
Docker
FROM python:3.11.7-slim-bookworm
|
|
|
|
WORKDIR /opt/musician
|
|
|
|
# reduce size (python specifics) -> src https://stackoverflow.com/questions/74616667/removing-pip-cache-after-installing-dependencies-in-docker-image
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
# here document in dockerfile src https://stackoverflow.com/questions/40359282/launch-a-cat-command-unix-into-dockerfile
|
|
RUN cat > /etc/pip.conf <<END
|
|
[install]
|
|
compile = no
|
|
|
|
[global]
|
|
no-cache-dir = True
|
|
END
|
|
|
|
RUN pip install --upgrade pip
|
|
RUN pip install wheel
|
|
|
|
COPY django-musician/requirements.txt .
|
|
RUN pip install -r requirements.txt
|
|
|
|
COPY django-musician .
|
|
|
|
COPY docker/musician.entrypoint.sh .
|
|
ENTRYPOINT sh ./musician.entrypoint.sh
|
|
|
|
#RUN python manage.py migrate
|
|
#
|
|
#EXPOSE 8080
|
|
#
|
|
#ENTRYPOINT [ "python", "manage.py", "runserver", "0.0.0.0:8080" ]
|