-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (22 loc) · 733 Bytes
/
Dockerfile
File metadata and controls
25 lines (22 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM python:3.12-slim
ENV PYTHONPATH "${PYTHONPATH}:/app"
ENV PATH "/app/scripts:${PATH}"
WORKDIR /app
# Install poetry
RUN set +x \
&& apt update \
&& apt upgrade -y \
&& apt install -y --no-install-recommends curl gcc build-essential \
&& curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python -\
&& ln -s /opt/poetry/bin/poetry /usr/local/bin/poetry \
&& apt-get purge --auto-remove -y curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& poetry config virtualenvs.create false
# Install dependencies
COPY pyproject.toml /app/
RUN poetry install --no-interaction --no-ansi --only main --no-root
# Prepare entrypoint
ADD . /app/
RUN chmod +x scripts/*
ENTRYPOINT ["docker-entrypoint.sh"]