Spaces:
Running
Running
Create Dockerfile
Browse files- Dockerfile +27 -0
Dockerfile
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an appropriate base image
|
2 |
+
FROM ubuntu:latest
|
3 |
+
# Install QEMU, noVNC, and git
|
4 |
+
RUN apt-get update && \
|
5 |
+
apt-get install -y qemu-system-x86 novnc websockify git && \
|
6 |
+
apt-get clean
|
7 |
+
|
8 |
+
# Create a directory for noVNC
|
9 |
+
RUN mkdir -p /noVNC
|
10 |
+
|
11 |
+
# Clone the noVNC repository
|
12 |
+
RUN git clone https://github.com/novnc/noVNC.git /noVNC
|
13 |
+
|
14 |
+
# Expose the ports for VNC and noVNC
|
15 |
+
EXPOSE 5900 7860
|
16 |
+
RUN qemu-img create vm.img 32G
|
17 |
+
RUN chmod +777 vm.img
|
18 |
+
RUN cp vm.img /home/ubuntu/vm.img
|
19 |
+
RUN chmod +777 /home/ubuntu/vm.img
|
20 |
+
RUN wget https://github.com/imguest24897/SimpleOS/releases/download/v0.5alpha-build0510/SimpleOS.iso
|
21 |
+
RUN chmod +x SimpleOS.iso
|
22 |
+
RUN cp SimpleOS.iso /home/ubuntu
|
23 |
+
# Start QEMU and noVNC
|
24 |
+
CMD /bin/bash -c " \
|
25 |
+
nohup qemu-system-x86_64 -m 2G -cdrom ~/SimpleOS.iso -hda ~/vm.img -vnc :0 -daemonize -vga vmware -usbdevice tablet && \
|
26 |
+
cd /noVNC && \
|
27 |
+
websockify --web . 7860 localhost:5900"
|