Aanpassing requirements.txt

This commit is contained in:
Ard Kuijpers
2023-02-11 23:52:50 +01:00
parent 239240ecb6
commit 24f736218e
3 changed files with 49 additions and 134 deletions

31
Dockerfile Normal file
View File

@@ -0,0 +1,31 @@
# For more information, please refer to https://aka.ms/vscode-docker-python
FROM python:3.9-slim as base
FROM base as builder
RUN apt-get update \
&& apt-get install gcc=4:10.* git=1:2.* -y \
&& apt-get clean
COPY requirements.txt /app/requirements.txt
WORKDIR /app
ENV PATH=/root/.local/bin:$PATH
RUN pip install --user -r requirements.txt
COPY . /app
FROM base as app
COPY . /app
COPY --from=builder /root/.local /root/.local
# # Keeps Python from generating .pyc files in the container
# ENV PYTHONDONTWRITEBYTECODE 1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED 1
# Access local binaries
ENV PATH=/root/.local/bin:$PATH
WORKDIR /app
# During debugging, this entry point will be overridden. For more information, refer to https://aka.ms/vscode-docker-python-debug
CMD ["python", "app.py"]