Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +17 -13
Dockerfile
CHANGED
@@ -56,16 +56,20 @@ ENV CPU_CORES="2"
|
|
56 |
ENV DISK_SIZE="64G"
|
57 |
ENV VERSION="win11"
|
58 |
|
59 |
-
#
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
|
|
|
|
|
|
|
56 |
ENV DISK_SIZE="64G"
|
57 |
ENV VERSION="win11"
|
58 |
|
59 |
+
# 创建启动脚本并设置执行权限
|
60 |
+
RUN echo '#!/bin/bash\n\
|
61 |
+
qemu-system-x86_64 \\\n\
|
62 |
+
-hda /run/disk.img \\\n\
|
63 |
+
-m ${RAM_SIZE} \\\n\
|
64 |
+
-smp ${CPU_CORES} \\\n\
|
65 |
+
-vnc 0.0.0.0:7860 \\\n\
|
66 |
+
-usb \\\n\
|
67 |
+
-device usb-tablet \\\n\
|
68 |
+
-net nic \\\n\
|
69 |
+
-net user \\\n\
|
70 |
+
-device virtio-net \\\n\
|
71 |
+
-boot order=d \\\n\
|
72 |
+
-display none' > /home/user/start.sh && chmod +x /home/user/start.sh
|
73 |
+
|
74 |
+
# 使用启动脚本启动 QEMU
|
75 |
+
CMD ["/bin/bash", "/home/user/start.sh"]
|