Docker container for cloud use

Questions about Wine on Linux
Locked
sjt5jt
Newbie
Newbie
Posts: 1
Joined: Sat Sep 16, 2023 9:52 am

Docker container for cloud use

Post by sjt5jt »

My goal is to use an EXE as an AWS Lambda or Azure Functions runtime. For this I will need a Linux container with Wine, my project files, the cloud interface library (that give Python, Node, whatever access to cloud services) and a callback (Python, Node, whatever). I have a choice of EXEs: 32-bit or 64-bit.

Question 1
Is this known to be impossible? I found conflicts between the AWS Lambda Python and Node interface libraries and 32-bit architecture and inferred Lambda has no 32-bit interface code. Now I believe multi-architecture will support both 32-bit and 64-bit code, but have yet to test this.

At this point I am trying to call

Code: Select all

dyalogrt.exe reverse.dws
through Wine in a container on Docker Desktop. The EXE reads one file, writes another. (It’s a stub for the eventual runtime.) No GUI is required.

Question 2
Wine is a graphical application and assumes use of a GUI. Rather than configure a GUI then carefully not use it, is there a way to configure Wine for headless use?

viewtopic.php?t=37535 is the only source I’ve found on running Wine with a CUI.

Dockerfile:

Code: Select all

FROM ubuntu:22.04

# Enable 32-bit architecture
RUN dpkg --add-architecture i386 

RUN apt update
RUN apt-get install --assume-yes wget

# Add the repository
RUN mkdir -pm755 /etc/apt/keyrings
RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key

# Download the WineHQ sources file
RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources

# Update package information
RUN apt update 

# Install WineHQ
RUN apt install --install-recommends --assume-yes winehq-stable

WORKDIR /app

COPY dyalogrt.exe reverse.dws input.txt /app

ENTRYPOINT ["/bin/bash"]
In the running Docker container:

Code: Select all

root@e3ec5bdd4935:/app# WINEDLLOVERRIDES="explorer.exe=d" wineconsole dyalogrt.exe reverse.dws
0034:err:win:get_desktop_window failed to start explorer c0000135
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
00e0:err:win:get_desktop_window failed to start explorer c0000135
00e0:fixme:ole:CoInitializeSecurity 0000000000000000, -1, 0000000000000000, 0000000000000000, 1, 3, 0000000000000000, 0, 0000000000000000 stub
00e0:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
00e0:err:winediag:nodrv_CreateWindow L"The explorer process failed to start."
00e0:fixme:ver:GetCurrentPackageId (000000000041FDA0 0000000000000000): stub
root@e3ec5bdd4935:/app# 
Question 3
If there is no headless configuration, how can I configure Wine’s GUI minimally for headless use?
desessarts
Level 3
Level 3
Posts: 67
Joined: Wed Oct 04, 2023 7:57 am

Re: Docker container for cloud use

Post by desessarts »

about docker and wine, you should look at (old but still valid)

https://github.com/suchja/wine
Locked