Runnning Wine in Containers

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Level 2
Level 2
Posts: 24
Joined: Wed Aug 09, 2017 7:19 am
Location: Australia

Runnning Wine in Containers

Post by tk421 » Sun Feb 17, 2019 6:10 pm

Hi Everybody,

I have been trying to run wine in containers with certain legacy apps. I am currently trying with MT5, which there are Docker templates available, such as docker-metatrader (1)

Everything works well except for, when you open an account, you need to search for potential brokers. You write some keywords and you press "scan". For some reason, in the wine running in a computer it just works fine, but wine running under docker is unable to search for brokers.

I have noticed an error, I might be related with this problem:

0009:err:listview:LISTVIEW_WindowProc unknown msg 0400 wp=00000000 lp=00000000

This looks like it is related with comctl32. There are many posts that suggests to install the native dll, but in this case this is not the problem.

My guess is that wine expects something from the system, which is very common when you install a full distribution, but it does not exists in Docker unless you install it manually.

Does anybody has any idea what that could be ? How can I make this application fully operational in a container ?

What are the differences between docker and the computer ? well, the computer will have a lot of more packages installed by default, and a lot of more services running. tHEREFO

1 -

If you try to run the container, just be careful that is using the incorrect key for the repository. Rather than Downloading it should download

As a guide to reproduce the problem (not tested, you might need to fine tune one of those commands)

1 - Download MT5 from ... n=download . Install it in your computer

WINEARCH=win32 WINEPREFIX="~/.mt5_wine" wine mt5setup.exe

2 - Move the installed binaries to mv ~/.mt5_wine/drive_c/Program\ Files/MetaTrader\ 5 ~/Metatrader

3 - Clone the repository

git clone

4 - Modify Dockerfile and replace by

5 - Build the container

docker build . -t docker-metatrader

6 - Run the container

docker run \
--rm \
--net host \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v ~/Metatrader:/MetaTrader \
--name mt \

7 - Go to File -> Open an Account. Search by "forex" and press "Scan". If you run wine in your computer, it will return results. If you run in the container, it won't return any results. The expectations would be that the container should behave like running in the computer; the container version should return results.