-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest-installation
67 lines (51 loc) · 1.83 KB
/
test-installation
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
# Use Ubuntu as the base image
FROM ubuntu:20.04
# Avoid prompts from apt
ENV DEBIAN_FRONTEND=noninteractive
# Install Wine and other dependencies
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
wget
# Enable 32-bit architecture support and add WineHQ repository
RUN dpkg --add-architecture i386 && \
mkdir -p /etc/apt/keyrings && \
wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key && \
wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources
# Install Wine and other dependencies
RUN apt-get update && apt-get install -y \
wine \
wine32 \
winetricks \
xvfb \
python3 \
python3-pip \
wget \
&& rm -rf /var/lib/apt/lists/*
# Set up Wine environment
ENV WINEARCH=win32
ENV WINEPREFIX=/root/.wine
RUN apt-get update && apt-get install -y xvfb x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps
ENV DISPLAY=:99
RUN Xvfb :99 -screen 0 1024x768x16 & \
export DISPLAY=:99 && \
winetricks --unattended vcrun2015
RUN apt-get update && apt-get install -y xvfb
# Install Python for Windows
RUN xvfb-run -a wine winecfg && \
xvfb-run -a bash -c \
"wget https://www.python.org/ftp/python/3.10.0/python-3.10.0.exe && \
wine python-3.10.0.exe /quiet InstallAllUsers=1 PrependPath=1 && \
rm python-3.10.0.exe"
# Install mt5linux in both Linux and Windows Python environments
RUN pip3 install mt5linux \
&& wine python -m pip install mt5linux
# Download and install MetaTrader5
RUN wget https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mt5setup.exe \
&& wine mt5setup.exe /auto \
&& rm mt5setup.exe
# Set up the entry point
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 18812
ENTRYPOINT ["/entrypoint.sh"]