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

32 lines
791 B
Docker
Raw Permalink Normal View History

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