first commit
This commit is contained in:
55
Dockerfile
Normal file
55
Dockerfile
Normal file
@@ -0,0 +1,55 @@
|
||||
# Use Ubuntu as base image for better Wine support
|
||||
FROM ubuntu:22.04
|
||||
|
||||
# Avoid interactive prompts during installation
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Update system and install necessary packages
|
||||
RUN apt-get update && apt-get install -y \
|
||||
software-properties-common \
|
||||
wget \
|
||||
curl \
|
||||
gnupg2 \
|
||||
ca-certificates \
|
||||
apt-transport-https \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Add Wine repository and install Wine 64-bit
|
||||
RUN dpkg --add-architecture i386 \
|
||||
&& mkdir -pm755 /etc/apt/keyrings \
|
||||
&& wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key \
|
||||
&& wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --install-recommends winehq-stable \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Create a wine user to avoid running as root
|
||||
RUN useradd -m -s /bin/bash wineuser
|
||||
USER wineuser
|
||||
WORKDIR /home/wineuser
|
||||
|
||||
# Initialize Wine prefix
|
||||
RUN winecfg /v
|
||||
|
||||
# Set Wine to 64-bit mode
|
||||
ENV WINEARCH=win64
|
||||
ENV WINEPREFIX=/home/wineuser/.wine
|
||||
|
||||
# Download and install .NET SDK
|
||||
RUN cd /tmp \
|
||||
&& wget https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.301/dotnet-sdk-9.0.301-win-x64.exe \
|
||||
&& wine dotnet-sdk-9.0.301-win-x64.exe /quiet /install \
|
||||
&& rm dotnet-sdk-9.0.301-win-x64.exe
|
||||
|
||||
# Set environment variables for .NET
|
||||
ENV DOTNET_ROOT="$WINEPREFIX/drive_c/Program Files/dotnet"
|
||||
ENV PATH="$DOTNET_ROOT:$PATH"
|
||||
|
||||
# Verify installation
|
||||
RUN wine dotnet --version
|
||||
|
||||
# Set working directory for projects
|
||||
WORKDIR /home/wineuser/projects
|
||||
|
||||
# Default command
|
||||
CMD ["/bin/bash"]
|
Reference in New Issue
Block a user