Sign inSign up

mintjetos/metatrader

By mintjetos

•Updated over 2 years ago

Docker image for running MetaTrader 4 or MetaTrader 5 on Linux with X11 forwarding.

Image
Operating systems
1

10K+

mintjetos/metatrader repository overview

⁠MetaTrader Docker Image

Docker image for running MetaTrader 4 or MetaTrader 5 on Linux with X11 forwarding.

⁠Usage

⁠Running MetaTrader 5
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
⁠Start/Stop Docker container
docker start mt5
docker stop  mt5
⁠Running MetaTrader 4
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
⁠Start/Stop Docker container
docker start mt4
docker stop  mt4
⁠Volumes

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.

⁠Environment Variables
⁠DISPLAY:

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.

⁠Allow Connections to X Server:

Use xhost + to allow any user to connect to the X server.

xhost +

Tag summary

Content type

Image

Digest

sha256:a51afe5ac…

Size

803.6 MB

Last updated

over 2 years ago

docker pull mintjetos/metatrader