I'm setting up a CI/CD pipeline on a Gitlab instance for testing and freezing/compiling Python code. The binary executables will be generated using Pyinstaller. I want my pipeline to build executables for both Linux/Windows (64Bit).
All stages are working so far, except freezing the code for Windows. I'm trying to install 64bit python in a Docker container with wine. Although I'm explicitly downloading a 64Bit Windows executable, wine keeps complaining about missing 32bit support (which I explicitly don't want/need).
Can anyone tell me what causes this error/behavior and how to eventually fix it?
System Information
# uname -a
Linux underdesk 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Dockerfile
FROM ubuntu:latest
ENV PYTHON_SCRIPTNAME=$PYTHON_SCRIPTNAME
RUN apt-get -y update
RUN apt-get install -y wine-stable wget
RUN wget -O python-installer.exe https://www.python.org/ftp/python/3.11.1/python-3.11.1-amd64.exe
RUN wine python-installer.exe /quiet InstallAllUsers=1 PrependPath=1 TargetDir=/root/.wine/drive_c/Python
RUN wine /root/.wine/drive_c/Python/python.exe -m pip install --upgrade pip
RUN wine /root/.wine/drive_c/Python/python.exe -m pip install -r requirements.txt
Build process / error message
# docker build -t test_image -f Dockerfile --network=host .
Sending build context to Docker daemon 25.22MB
Step 1/8 : FROM ubuntu:latest
---> 6b7dfa7e8fdb
Step 2/8 : ENV PYTHON_SCRIPTNAME=$PYTHON_SCRIPTNAME
---> Using cache
---> 48a0ef5b97e2
Step 3/8 : RUN apt-get -y update
---> Using cache
---> 7257e5dd1581
Step 4/8 : RUN apt-get install -y wine-stable wget
---> Using cache
---> 4e60a561a548
Step 5/8 : RUN wget -O python-installer.exe https://www.python.org/ftp/python/3.11.1/python-3.11.1-amd64.exe
---> Using cache
---> 6df012acc310
Step 6/8 : RUN wine start python-installer.exe /quiet InstallAllUsers=1 PrependPath=1 TargetDir=/root/.wine/drive_c/Python
---> Running in aa3b7a55e550
it looks like wine32 is missing, you should install it.
multiarch needs to be enabled first. as root, please
execute "dpkg --add-architecture i386 && apt-get update &&
apt-get install wine32"
wine: created the configuration directory '/root/.wine'
0048:err:explorer:initialize_display_settings Failed to query current display settings for L"\\\\.\\DISPLAY1".
0048:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x80004002
0048:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x80004002
0048:err:ole:apartment_get_local_server_stream Failed: 0x80004002
002c:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
002c:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0050:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0050:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0050:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0050:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0050:err:ole:apartment_createwindowifneeded CreateWindow failed with error 14007
0050:err:ole:StdMarshalImpl_MarshalInterface Failed to create ifstub, hr 0x800736b7
0050:err:ole:CoMarshalInterface Failed to marshal the interface {6d5140c1-7436-11ce-8034-00aa006009fa}, hr 0x800736b7
0050:err:ole:apartment_get_local_server_stream Failed: 0x800736b7
0050:err:ole:start_rpcss Failed to open RpcSs service
0040:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0040:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0040:err:setupapi:SetupDefaultQueueCallbackW copy error 1812 L"@wineusb.sys,-1" -> L"C:\\windows\\inf\\wineusb.inf"
Could not find Wine Gecko. HTML rendering will be disabled.
it looks like wine32 is missing, you should install it.
multiarch needs to be enabled first. as root, please
execute "dpkg --add-architecture i386 && apt-get update &&
apt-get install wine32"
0098:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0098:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
Could not find Wine Gecko. HTML rendering will be disabled.
wine: configuration in L"/root/.wine" has been updated.
it looks like wine32 is missing, you should install it.
multiarch needs to be enabled first. as root, please
execute "dpkg --add-architecture i386 && apt-get update &&
apt-get install wine32"
00dc:err:process:exec_process L"Z:\\python-installer.exe" not supported on this system
Application could not be started, or no application associated with the specified file.
ShellExecuteEx failed: Bad EXE format for Z:\python-installer.exe.
The command '/bin/sh -c wine start python-installer.exe /quiet InstallAllUsers=1 PrependPath=1 TargetDir=/root/.wine/drive_c/Python' returned a non-zero code: 1