File size: 986 Bytes
8ec6a6f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a101f01
8ec6a6f
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Use an appropriate base image
FROM ubuntu:latest
# Install QEMU, noVNC, and git
RUN apt-get update && \
    apt-get install -y qemu-system-x86 novnc websockify git && \
    apt-get clean

# Create a directory for noVNC
RUN mkdir -p /noVNC

# Clone the noVNC repository
RUN git clone https://github.com/novnc/noVNC.git /noVNC

# Expose the ports for VNC and noVNC
EXPOSE 5900 7860
RUN qemu-img create vm.img 32G
RUN chmod +777 vm.img
RUN cp vm.img /home/ubuntu/vm.img
RUN chmod +777 /home/ubuntu/vm.img
RUN wget https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/aarch64/alpine-standard-3.20.3-aarch64.iso
RUN mv alpine-standard-3.20.3-aarch64.iso NclearOS2.iso
RUN chmod +x NclearOS2.iso
RUN cp NclearOS2.iso /home/ubuntu
# Start QEMU and noVNC
CMD /bin/bash -c " \
    nohup qemu-system-aarch64 -cpu cortex-a53 -M raspi3b -m 2G -cdrom ~/NclearOS2.iso -hda ~/vm.img -vnc :0 -daemonize -vga vmware -usbdevice tablet && \
    cd /noVNC && \
    websockify --web . 7860 localhost:5900"