forked from tickelton/docker-metatrader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.aB-64bit
48 lines (41 loc) · 1.34 KB
/
Dockerfile.aB-64bit
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
# Run MetaTrader in a container.
#
# Copyright (c) 2022 tick <[email protected]>
#
# SPDX-License-Identifier: ISC
#
# docker run \
# --net host \
# -v /tmp/.X11-unix:/tmp/.X11-unix \
# -e DISPLAY \
# -v $AMIBROKER_HOST_PATH:/amiBroker \
# --name mt \
# tickelton/mt
# Base docker image.
FROM ubuntu:focal
ADD https://dl.winehq.org/wine-builds/winehq.key /winehq.key
# Disable interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Install Wine
RUN apt-get update && \
apt-get install -y gnupg apt-utils && \
echo "deb http://dl.winehq.org/wine-builds/ubuntu/ focal main" >> /etc/apt/sources.list && \
apt-key add /winehq.key && \
mv /winehq.key /usr/share/keyrings/winehq-archive.key && \
dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y -q --install-recommends winehq-devel && \
rm -rf /var/lib/apt/lists/* /winehq.key
# Add wine user.
# NOTE: You might need to change the UID/GID so the
# wine user has write access to your amiBroker
# directory at $AMIBROKER_HOST_PATH.
RUN groupadd -g 1000 wine \
&& useradd -g wine -u 1000 wine \
&& mkdir -p /home/wine/.wine && chown -R wine:wine /home/wine
# Run amiBroker as non privileged user.
USER wine
# Autorun amiBroker Terminal.
ENTRYPOINT [ "wine" ]
#CMD [ "/MetaTrader/terminal64.exe", "/portable" ]
CMD [ "/AmiBroker/Broker.exe", "/portable" ]