forked from EA31337/EA31337
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
88 lines (80 loc) · 2.41 KB
/
Dockerfile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Prepare source code.
FROM ea31337/ea-tester:dev as ea31337-ea
# Adjust the user's UID.
ARG UID=1001
USER root
RUN usermod -u $UID ubuntu
# Copy files.
USER ubuntu
COPY --chown=ubuntu:root ./ /opt/EA
# Download MTE.
RUN curl -LO "https://github.com/EA31337/MT-Platforms/releases/download/5.0.0.2361/mt-5.0.0.2361.zip" && \
unzip -q -- *.zip && \
cp -v -- */metaeditor*.exe /opt/EA
# Build Lite version.
FROM ea31337-ea as ea31337-lite
WORKDIR /opt/EA
RUN make Lite
RUN make Lite-Release
RUN make Lite-Backtest
RUN make Lite-Optimize
# Build Advanced version.
FROM ea31337-ea as ea31337-advanced
WORKDIR /opt/EA
RUN make Advanced
RUN make Advanced-Release
RUN make Advanced-Backtest
RUN make Advanced-Optimize
# Build Rider version.
FROM ea31337-ea as ea31337-rider
WORKDIR /opt/EA
RUN make Rider
RUN make Rider-Release
RUN make Rider-Backtest
RUN make Rider-Optimize
# Build all versions.
FROM ea31337-ea as ea31337
WORKDIR /opt/EA
COPY --from=ea31337-lite --chown=ubuntu:root "/opt/EA/*.ex?" "/opt/EA/"
COPY --from=ea31337-advanced --chown=ubuntu:root "/opt/EA/*.ex?" "/opt/EA/"
COPY --from=ea31337-rider --chown=ubuntu:root "/opt/EA/*.ex?" "/opt/EA/"
# Build-time metadata as defined at http://label-schema.org
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="EA31337" \
org.label-schema.description="Multi-strategy advanced trading robot for Forex." \
org.label-schema.url="https://github.com/EA31337/EA31337" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/EA31337/EA31337" \
org.label-schema.vendor="FX31337" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0"
# EURUSD 2017
FROM ea31337/ea-tester:EURUSD-2017-DS as ea31337-eurusd-2017
# Adjust the user's UID.
ARG UID=1001
USER root
RUN usermod -u $UID ubuntu
# Copy EA files.
USER ubuntu
COPY --from=ea31337 --chown=ubuntu:root "/opt/EA" "/opt/EA"
# EURUSD 2018
FROM ea31337/ea-tester:EURUSD-2018-DS as ea31337-eurusd-2018
# Adjust the user's UID.
ARG UID=1001
USER root
RUN usermod -u $UID ubuntu
# Copy EA files.
USER ubuntu
COPY --from=ea31337 --chown=ubuntu:root "/opt/EA" "/opt/EA"
# EURUSD 2019
FROM ea31337/ea-tester:EURUSD-2019-DS as ea31337-eurusd-2019
# Adjust the user's UID.
ARG UID=1001
USER root
RUN usermod -u $UID ubuntu
# Copy EA files.
USER ubuntu
COPY --from=ea31337 --chown=ubuntu:root "/opt/EA" "/opt/EA"