-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
48 lines (38 loc) · 1.51 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
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
USER root
RUN mv /opt/pywine /opt/mtwine
USER cloud
ENV DEBIAN_FRONTEND noninteractive
ENV WINEDEBUG fixme-all
ENV WINEPREFIX /opt/mtwine
ARG APT_FLAGS="-y -qq --no-install-recommends --no-install-suggests"
ARG WORKDIR=/install
WORKDIR ${WORKDIR}
ARG MT_VERSION
ARG MT_SETUP_URL="https://download.mql5.com/cdn/web/metaquotes.software.corp/mt${MT_VERSION}/mt${MT_VERSION}setup.exe"
RUN curl -sL ${MT_SETUP_URL} | install /dev/stdin mtsetup.exe \
&& xvfb-run sh -c "\
wine ./mtsetup.exe /auto; \
wineserver -w" \
&& rm mtsetup.exe
RUN xvfb-run sh -c "\
wine pip install MetaTrader; \
wineserver -w"
ENV WINEDEBUG -all
ARG CREATED_DATE
ARG REFNAME
ARG REPOSITORY
LABEL org.opencontainers.image.authors="Richard 'Sylver' Kemp <[email protected]>"
LABEL org.opencontainers.image.created=${CREATED_DATE}
LABEL org.opencontainers.image.description="Image containing a wine headless prefix with MetaTrader® ${MT_VERSION} installed."
LABEL org.opencontainers.image.documentation="${REPOSITORY}/specs/metatrader"
LABEL org.opencontainers.image.licenses="https://www.metaquotes.net/en/legal"
LABEL org.opencontainers.image.ref.name=${REFNAME}
LABEL org.opencontainers.image.revision=
LABEL org.opencontainers.image.source=${REPOSITORY}
LABEL org.opencontainers.image.title="Headless Wine for MetaTrader®"
LABEL org.opencontainers.image.url="${REPOSITORY}/specs/metatrader"
LABEL org.opencontainers.image.vendor="Materya"
LABEL org.opencontainers.image.version=${MT_VERSION}
CMD ["/bin/bash"]