-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (18 loc) · 749 Bytes
/
Dockerfile
File metadata and controls
28 lines (18 loc) · 749 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
# todo: use multistage build to only use what is required at the end.
FROM python:3.12
ARG BUILD=prod
ARG BUILD_VERSION=0.1.0
ENV POETRY_VERSION=1.8.3
# should be fixed but as high as possible
ENV POETRY_VIRTUALENVS_CREATE=false \
POETRY_NO_INTERACTION=1 \
POETRY_HOME="/opt/poetry"
ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH"
# RUN apt-get update && apt-get install -y <ubuntu-packages> # install additional packages such as tesseract, imagemagick, g++ etc. IF REQUIRED
WORKDIR /app
CMD ["python_template"] # TODO: change to run command
RUN curl -sSL https://install.python-poetry.org | python -
COPY . .
RUN poetry install --without dev
RUN poetry version $BUILD_VERSION
RUN if [ $BUILD = "test" ] ; then poetry install; fi