This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
idhub-docker/docker/musician.Dockerfile
pedro 9a67710ec3 new Dockerfiles for musician and orchestra
orchestra: 1.28GB -> 848MB
musician:   497MB -> 169MB
2024-01-26 03:44:56 +01:00

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" ]