forked from slowfound/metatrader5-quant-server-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (44 loc) · 1.46 KB
/
Dockerfile
File metadata and controls
55 lines (44 loc) · 1.46 KB
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
# Stage 1: Base image with apt packages
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbullseye-8446af38-ls104 AS base
ENV TITLE=MetaTrader
ENV WINEARCH=win64
ENV WINEPREFIX="/config/.wine"
ENV DISPLAY=:0
# Ensure the directory exists with correct permissions
RUN mkdir -p /config/.wine && \
chown -R abc:abc /config/.wine && \
chmod -R 755 /config/.wine
# Update package lists and upgrade packages
RUN apt-get update && apt-get upgrade -y
# Install required packages
RUN apt-get install -y \
dos2unix \
python3-pip \
wget \
python3-pyxdg \
netcat \
&& pip3 install --upgrade pip
# Add WineHQ repository key and APT source
RUN wget -q https://dl.winehq.org/wine-builds/winehq.key > /dev/null 2>&1\
&& apt-key add winehq.key \
&& add-apt-repository 'deb https://dl.winehq.org/wine-builds/debian/ bullseye main' \
&& rm winehq.key
# Add i386 architecture and update package lists
RUN dpkg --add-architecture i386 \
&& apt-get update
# Install WineHQ stable package and dependencies
RUN apt-get install --install-recommends -y \
winehq-stable \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Stage 2: Final image
FROM base
# Copy the scripts directory and convert start.sh to Unix format
COPY scripts /scripts
RUN dos2unix /scripts/*.sh && \
chmod +x /scripts/*.sh
COPY /root /
RUN touch /var/log/mt5_setup.log && \
chown abc:abc /var/log/mt5_setup.log && \
chmod 644 /var/log/mt5_setup.log
VOLUME /config