forked from Project-Path-of-Exile-Wiki/PyPoE
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (25 loc) · 764 Bytes
/
Dockerfile
File metadata and controls
36 lines (25 loc) · 764 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
33
34
35
36
FROM python:slim AS base
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONFAULTHANDLER 1
ENV PYTHONUNBUFFERED 1
FROM base as builder
WORKDIR /builder
COPY pyproject.toml poetry.lock ./
RUN pip install --no-cache-dir poetry &&\
python -m venv /venv &&\
poetry export -f requirements.txt |\
/venv/bin/pip install --no-cache-dir -r /dev/stdin
COPY . .
RUN poetry build && /venv/bin/pip install --no-cache-dir dist/*.whl
FROM base as final
ENV PATH "/venv/bin:${PATH}"
ENV VIRTUAL_ENV "/venv"
COPY --from=builder /venv /venv
WORKDIR /pypoe
COPY export.bash ./
RUN mkdir ./out ./temp &&\
pypoe_exporter config set out_dir ./out &&\
pypoe_exporter config set temp_dir ./temp &&\
pypoe_exporter setup perform