-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 965 Bytes
/
Dockerfile
File metadata and controls
32 lines (25 loc) · 965 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
26
27
28
29
30
31
32
FROM python:3.13 as python-base
# Set Poetry's configs
ENV POETRY_VERSION=2.2.1
ENV POETRY_HOME=/opt/poetry
ENV POETRY_VENV=/opt/poetry-venv
ENV PATH="${PATH}:${POETRY_VENV}/bin"
ENV POETRY=${POETRY_VENV}/bin/poetry
ENV WORKING_DIR=/focus_validator
# Install Poetry
RUN apt install curl
RUN curl -sSL https://install.python-poetry.org | POETRY_VERSION=$POETRY_VERSION POETRY_HOME=$POETRY_HOME POETRY_VENV=$POETRY_VENV python3 -
# Create working directory
RUN mkdir ${WORKING_DIR}
WORKDIR ${WORKING_DIR}
# Copies poetry config to the image and Install FOCUS validator dependencies only
COPY README.md README.md
COPY poetry.lock poetry.lock
COPY pyproject.toml pyproject.toml
RUN /opt/poetry/bin/poetry install --only main --no-root
# Copies FOCUS validator to the image
COPY . ${WORKING_DIR}
# Install the focus_validator package itself
RUN /opt/poetry/bin/poetry install --only-root
# Sets the entrypoint
ENTRYPOINT [ "${POETRY}", "run", "focus-validator" ]