Ramesh-vani commited on
Commit
8f4d442
·
verified ·
1 Parent(s): 8aa5d7e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -8
Dockerfile CHANGED
@@ -1,14 +1,16 @@
1
- FROM scratch
2
- COPY --from=qemux/qemu-docker:4.14 / /
3
 
 
4
  ARG DEBCONF_NOWARNINGS="yes"
5
  ARG DEBIAN_FRONTEND="noninteractive"
6
  ARG DEBCONF_NONINTERACTIVE_SEEN="true"
7
 
8
- RUN apt-get update \
9
- && apt-get --no-install-recommends -y install \
 
10
  curl \
11
- 7zip \
12
  wsdd \
13
  samba \
14
  wimtools \
@@ -16,27 +18,42 @@ RUN apt-get update \
16
  cabextract \
17
  genisoimage \
18
  libxml2-utils \
19
- && apt-get clean \
20
- && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
 
 
 
 
21
 
 
22
  COPY ./src /run/
23
  COPY ./assets /run/assets
24
 
 
25
  ADD https://raw.githubusercontent.com/christgau/wsdd/master/src/wsdd.py /usr/sbin/wsdd
26
  ADD https://github.com/qemus/virtiso/releases/download/v0.1.240/virtio-win-0.1.240.iso /run/drivers.iso
27
 
28
- RUN chmod +x /run/*.sh && chmod +x /usr/sbin/wsdd
 
29
 
 
30
  EXPOSE 7860
31
 
 
32
  VOLUME /storage
33
 
 
34
  ENV RAM_SIZE="4G"
35
  ENV CPU_CORES="2"
36
  ENV DISK_SIZE="64G"
37
  ENV VERSION="win11"
38
 
 
39
  ARG VERSION_ARG="0.0"
40
  RUN echo "$VERSION_ARG" > /run/version
41
 
 
 
 
 
42
  ENTRYPOINT ["/usr/bin/tini", "-s", "/run/entry.sh"]
 
1
+ # Start with a minimal Debian base image instead of scratch for better compatibility
2
+ FROM debian:bookworm-slim
3
 
4
+ # Set necessary environment variables
5
  ARG DEBCONF_NOWARNINGS="yes"
6
  ARG DEBIAN_FRONTEND="noninteractive"
7
  ARG DEBCONF_NONINTERACTIVE_SEEN="true"
8
 
9
+ # Update and install required packages
10
+ RUN apt-get update && \
11
+ apt-get --no-install-recommends -y install \
12
  curl \
13
+ p7zip-full \
14
  wsdd \
15
  samba \
16
  wimtools \
 
18
  cabextract \
19
  genisoimage \
20
  libxml2-utils \
21
+ tini && \
22
+ apt-get clean && \
23
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
24
+
25
+ # Copy necessary files from qemux/qemu-docker image
26
+ COPY --from=qemux/qemu-docker:4.14 / /
27
 
28
+ # Copy custom scripts and assets
29
  COPY ./src /run/
30
  COPY ./assets /run/assets
31
 
32
+ # Add external scripts and drivers
33
  ADD https://raw.githubusercontent.com/christgau/wsdd/master/src/wsdd.py /usr/sbin/wsdd
34
  ADD https://github.com/qemus/virtiso/releases/download/v0.1.240/virtio-win-0.1.240.iso /run/drivers.iso
35
 
36
+ # Ensure necessary scripts have execute permissions
37
+ RUN chmod +x /run/*.sh /usr/sbin/wsdd
38
 
39
+ # Expose required ports
40
  EXPOSE 7860
41
 
42
+ # Define a volume for storage
43
  VOLUME /storage
44
 
45
+ # Set environment variables
46
  ENV RAM_SIZE="4G"
47
  ENV CPU_CORES="2"
48
  ENV DISK_SIZE="64G"
49
  ENV VERSION="win11"
50
 
51
+ # Store version argument in a file
52
  ARG VERSION_ARG="0.0"
53
  RUN echo "$VERSION_ARG" > /run/version
54
 
55
+ # Ensure the script runs as root
56
+ USER root
57
+
58
+ # Define entrypoint script using Tini for proper process management
59
  ENTRYPOINT ["/usr/bin/tini", "-s", "/run/entry.sh"]