Spaces:
Paused
Paused
File size: 1,585 Bytes
159baa8 8f4d442 3a15473 159baa8 c1fe256 3a15473 159baa8 8f4d442 3a15473 8f4d442 3a15473 159baa8 8f4d442 3a15473 8f4d442 3a15473 8f4d442 3a15473 159baa8 3a15473 159baa8 c1fe256 8f4d442 3a15473 8f4d442 c1fe256 3a15473 8f4d442 c1fe256 3a15473 8f4d442 3a15473 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# Use a minimal Debian base image
FROM debian:bookworm-slim
# Set non-interactive mode for package installation
ARG DEBIAN_FRONTEND="noninteractive"
# Ensure we install sudo for privilege management
RUN apt-get update && \
apt-get --no-install-recommends -y install \
curl \
p7zip-full \
wsdd \
samba \
wimtools \
dos2unix \
cabextract \
genisoimage \
libxml2-utils \
sudo \
tini && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Copy necessary files from qemux/qemu-docker image
COPY --from=qemux/qemu-docker:4.14 / /
# Copy custom scripts and assets
COPY ./src /run/
COPY ./assets /run/assets
# Add external scripts and drivers
ADD https://raw.githubusercontent.com/christgau/wsdd/master/src/wsdd.py /usr/sbin/wsdd
ADD https://github.com/qemus/virtiso/releases/download/v0.1.240/virtio-win-0.1.240.iso /run/drivers.iso
# Ensure necessary scripts have execute permissions and are owned by root
RUN chmod +x /run/*.sh /usr/sbin/wsdd && \
chmod 755 /run/entry.sh && \
chown root:root /run/entry.sh
# Expose necessary ports
EXPOSE 7860
# Define a volume for storage
VOLUME /storage
# Set environment variables
ENV RAM_SIZE="4G"
ENV CPU_CORES="2"
ENV DISK_SIZE="64G"
ENV VERSION="win11"
# Store version argument in a file
ARG VERSION_ARG="0.0"
RUN echo "$VERSION_ARG" > /run/version
# Ensure the script runs as root
USER root
# Define entrypoint script using Tini for proper process management
ENTRYPOINT ["/usr/bin/tini", "-s", "/run/entry.sh"]
|