forked from chainstacklabs/chainbench
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (20 loc) · 707 Bytes
/
Dockerfile
File metadata and controls
28 lines (20 loc) · 707 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
# build stage
FROM python:3.10-buster AS venv
# copy files
COPY pyproject.toml poetry.lock ./
WORKDIR /app
# install poetry
ENV POETRY_VERSION=1.5.0
RUN curl -sSL https://install.python-poetry.org | python3 -
# The `--copies` option tells `venv` to copy libs and binaries
RUN python -m venv --copies /app/venv
RUN . /app/venv/bin/activate && $HOME/.local/bin/poetry install --no-directory --without dev --no-root --compile
# runtime stage
FROM python:3.10-slim-buster as prod
COPY --from=venv /app/venv /app/venv/
ENV PATH /app/venv/bin:$PATH
RUN apt-get update && apt-get install -y tini htop nano
WORKDIR /app
COPY . ./
RUN python -m pip install .
ENTRYPOINT ["/usr/bin/tini", "--", "chainbench"]