1tbfree commited on
Commit
80ecf9a
1 Parent(s): 3f89d6c

Create Dockerfile

Browse files
Files changed (1) hide show
  1. 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://dl-cdn.alpinelinux.org/alpine/v3.20/releases/x86/alpine-standard-3.20.2-x86.iso
21
+ RUN chmod +x alpine-standard-3.20.2-x86.iso
22
+ RUN cp alpine-standard-3.20.2-x86.iso /home/ubuntu
23
+ # Start QEMU and noVNC
24
+ CMD /bin/bash -c " \
25
+ nohup qemu-system-i386 -m 2G -cdrom ~/alpine-standard-3.20.2-x86.iso -hda ~/vm.img -vnc :0 -daemonize -vga vmware -usbdevice tablet && \
26
+ cd /noVNC && \
27
+ websockify --web . 7860 localhost:5900"