mirror of
https://github.com/FutureOfMedTech-FITM-hack/backend.git
synced 2024-11-24 07:13:43 +03:00
28 lines
551 B
Docker
28 lines
551 B
Docker
FROM python:3.9.6-slim-buster
|
|
RUN apt-get update && apt-get install -y \
|
|
gcc \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
RUN pip install poetry==1.2.2
|
|
|
|
# Configuring poetry
|
|
RUN poetry config virtualenvs.create false
|
|
|
|
# Copying requirements of a project
|
|
COPY pyproject.toml poetry.lock /app/src/
|
|
WORKDIR /app/src
|
|
|
|
# Installing requirements
|
|
RUN poetry install
|
|
# Removing gcc
|
|
RUN apt-get purge -y \
|
|
gcc \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Copying actuall application
|
|
COPY . /app/src/
|
|
RUN poetry install
|
|
|
|
CMD ["/usr/local/bin/python", "-m", "med_backend"]
|