Spaces:
Paused
Paused
Create Dockerfile
Browse files- Dockerfile +28 -0
Dockerfile
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/aarch64/alpine-standard-3.20.3-aarch64.iso
|
| 21 |
+
RUN mv alpine-standard-3.20.3-aarch64.iso NclearOS2.iso
|
| 22 |
+
RUN chmod +x NclearOS2.iso
|
| 23 |
+
RUN cp NclearOS2.iso /home/ubuntu
|
| 24 |
+
# Start QEMU and noVNC
|
| 25 |
+
CMD /bin/bash -c " \
|
| 26 |
+
nohup qemu-system-x86_64 -cpu cortex-a53 -M raspi3b -m 2G -cdrom ~/NclearOS2.iso -hda ~/vm.img -vnc :0 -daemonize -vga vmware -usbdevice tablet && \
|
| 27 |
+
cd /noVNC && \
|
| 28 |
+
websockify --web . 7860 localhost:5900"
|