forked from iterativv/NostalgiaForInfinity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.custom
More file actions
30 lines (20 loc) · 730 Bytes
/
Dockerfile.custom
File metadata and controls
30 lines (20 loc) · 730 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
ARG sourceimage=freqtradeorg/freqtrade
ARG sourcetag=stable
# Stage 1: Build dependencies
FROM ${sourceimage}:${sourcetag} AS builder
USER root
RUN pip install --upgrade pip
COPY --chown=1000:1000 tests/requirements.txt /freqtrade/
USER ftuser
RUN --mount=type=cache,target=/home/ftuser/.cache/pip \
pip install --user --no-build-isolation --no-cache-dir -r /freqtrade/requirements.txt
USER root
# Fix ownership of user install directory
RUN chown -R 1000:1000 /home/ftuser/.local
# Stage 2: Final image
FROM ${sourceimage}:${sourcetag}
USER root
COPY --from=builder /home/ftuser/.local /home/ftuser/.local
COPY --chown=1000:1000 tests/requirements.txt /freqtrade/
USER ftuser
ENV PATH=/home/ftuser/.local/bin:$PATH