Skip to content

Instantly share code, notes, and snippets.

@jensmeder
Last active March 23, 2024 21:13
Show Gist options
  • Save jensmeder/8da271d8b1a2507609b02a7401bfe9a0 to your computer and use it in GitHub Desktop.
Save jensmeder/8da271d8b1a2507609b02a7401bfe9a0 to your computer and use it in GitHub Desktop.
Dockerfile for running x86 applications with Wine in Alpine Docker Containers
FROM i386/alpine:3.10.2
# Wine 32Bit for running EXE
RUN apk add --no-cache wine=3.0.4-r1 freetype=2.10.0-r0
# Configure Wine
RUN winecfg
# Install wget
RUN apk add --no-cache wget=1.20.3-r0
# Download Mono
RUN wget -P /mono http://dl.winehq.org/wine/wine-mono/4.9.3/wine-mono-4.9.3.msi
# Install Mono Runtime for .NET Applications
RUN wine msiexec /i /mono/wine-mono-4.9.3.msi
RUN rm -rf /mono/wine-mono-4.9.3.msi
# Fake X11 display for headless execution
RUN apk add --no-cache xvfb-run=1.20.4-r0
# Copy EXE
COPY app.exe /app.exe
# Run the application
CMD ["xvfb-run", "wine" ,"/app.exe"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment