I’ve been stuck with this problem for a few days already. No solutions found even after a lot of research.
Basically, I’m trying to build a docker image and need to install (among other things) Visual Code and Python using wine. For both I’m required to run the installer using xvfb-run command.
Below is my input code (snippet from my Dockerfile):
RUN apt install xvfb winetricks -y
RUN xvfb-run -a winetricks -q vcrun2015
RUN sleep 30
RUN wget https://www.python.org/ftp/python/3.11.9/python-3.11.9-amd64.exe
RUN xvfb-run -a wine python-3.11.9-amd64.exe /quiet TargetDir=C:\Python\Python311 Include_doc=0 InstallAllUsers=1 PrependPath=1
RUN sleep 30
First xvfb-run command runs successfully (-a parameter takes server :99 as default) and installs vcrun2015 successfully.
Second xvfb-run takes another server (:100) but returns the following error:
RUN xvfb-run -a wine python-3.11.9-amd64.exe /quiet TargetDir=C:PythonPython311 Include_doc=0 InstallAllUsers=1 PrependPath=1:
3.848 X connection to :100 broken (explicit kill or server shutdown).
3.848 X connection to :100 broken (explicit kill or server shutdown).
Both installations work individually. The issue is really in the second xvfb-run execution.
What I’ve tried so far:
- Different versions of Wine and Ubuntu.
- Pass –server-num manually instead of using -a. Whatever server number I pass in second xvfb-run execution, it will be referenced in the error message.
- Instantiate each Xvfb as background process (Xvfb :99 -ac &) but unable to kill them in Dockerfile; also tried using tini.