Docker image for running MetaTrader 4 or MetaTrader 5 on Linux with X11 forwarding.
10K+
Docker image for running MetaTrader 4 or MetaTrader 5 on Linux with X11 forwarding.
xhost +
docker volume create wine
sudo mkdir -p /var/lib/docker/volumes/wine/_data/mt5
docker run -d -it --name mt5 \
-e VERSION=mt5 \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /tmp/.Xauthority:/tmp/.Xauthority \
-v /var/lib/docker/volumes/wine/_data/mt5:'/home/mint/.mt5/drive_c/Program Files/MetaTrader 5' \
mintjetos/metatrader:latest
docker start mt5
docker start mt5
docker stop mt5
xhost +
docker volume create wine
sudo mkdir -p /var/lib/docker/volumes/wine/_data/mt4
docker run -d -it --name mt4 \
-e VERSION=mt4 \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /tmp/.Xauthority:/tmp/.Xauthority \
-v /var/lib/docker/volumes/wine/_data/mt4:'/home/mint/.mt4/drive_c/Program Files (x86)/MetaTrader 4' \
mintjetos/metatrader:latest
docker start mt4
docker start mt4
docker stop mt4
Ensure that the necessary volumes are created and correctly mounted. The volumes should be structured as follows:
For MetaTrader 5: /var/lib/docker/volumes/wine/_data/mt5
For MetaTrader 4: /var/lib/docker/volumes/wine/_data/mt4
These paths should contain the respective MetaTrader installations.
This environment variable should be set to the display you want to use. It is necessary for GUI applications to render correctly.
Make sure that you have the correct permissions to access the X11 socket and .Xauthority file. Ensure Wine is correctly set up in the container to support MetaTrader applications.
Use xhost + to allow any user to connect to the X server.
xhost +
Content type
Image
Digest
sha256:a51afe5ac…
Size
803.6 MB
Last updated
over 2 years ago
docker pull mintjetos/metatrader