wkplhc commited on
Commit
bcd132b
1 Parent(s): 84254dc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -19
Dockerfile CHANGED
@@ -46,8 +46,8 @@ COPY --chown=user ./assets /run/assets
46
  ADD --chown=user https://raw.githubusercontent.com/christgau/wsdd/v0.8/src/wsdd.py /usr/sbin/wsdd
47
  ADD --chown=user https://github.com/qemus/virtiso-whql/releases/download/v1.9.43-0/virtio-win-1.9.43.tar.xz /drivers.txz
48
 
49
- # 暴露端口 (使用 7860 端口)
50
- EXPOSE 7860 3389
51
  VOLUME /storage
52
 
53
  # 设置环境变量
@@ -55,21 +55,10 @@ ENV RAM_SIZE="4G"
55
  ENV CPU_CORES="2"
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"]
 
46
  ADD --chown=user https://raw.githubusercontent.com/christgau/wsdd/v0.8/src/wsdd.py /usr/sbin/wsdd
47
  ADD --chown=user https://github.com/qemus/virtiso-whql/releases/download/v1.9.43-0/virtio-win-1.9.43.tar.xz /drivers.txz
48
 
49
+ # 暴露端口和设置卷
50
+ EXPOSE 8006 3389
51
  VOLUME /storage
52
 
53
  # 设置环境变量
 
55
  ENV CPU_CORES="2"
56
  ENV DISK_SIZE="64G"
57
  ENV VERSION="win11"
58
+ ENV LANG="en_US.UTF-8"
59
+ ENV LANGUAGE="en_US:en"
60
+ ENV LC_ALL="en_US.UTF-8"
61
+ ENV TZ="America/New_York"
62
 
63
+ # 启动Windows环境
64
+ CMD ["qemu-system-x86_64", "-m", "$RAM_SIZE", "-smp", "cpus=$CPU_CORES", "-drive", "file=/drivers.txz,if=virtio", "-vnc", ":0", "-net", "user,hostfwd=tcp::3389-:3389", "-net", "nic"]