Upload mac15-base.dockerfile with huggingface_hub
Browse files- mac15-base.dockerfile +42 -0
mac15-base.dockerfile
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use Ubuntu 26.04 as the base image
|
| 2 |
+
FROM ubuntu:26.04
|
| 3 |
+
|
| 4 |
+
# 1. Install QEMU, UEFI (OVMF), and necessary tools
|
| 5 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
+
RUN apt-get update && apt-get install -y \
|
| 7 |
+
qemu-system-x86 \
|
| 8 |
+
qemu-utils \
|
| 9 |
+
ovmf \
|
| 10 |
+
net-tools \
|
| 11 |
+
novnc \
|
| 12 |
+
wget \
|
| 13 |
+
zip \
|
| 14 |
+
python3-websockify \
|
| 15 |
+
python3-numpy \
|
| 16 |
+
strace \
|
| 17 |
+
&& apt-get clean \
|
| 18 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 19 |
+
|
| 20 |
+
# 2. Setup Working Directory
|
| 21 |
+
WORKDIR /vm
|
| 22 |
+
|
| 23 |
+
# 3. Download OpenCore ISO
|
| 24 |
+
RUN wget "https://github.com/thenickdude/KVM-Opencore/releases/download/v21/OpenCore-v21.iso.gz" -O /vm/OpenCore.iso.gz \
|
| 25 |
+
&& gzip -d /vm/OpenCore.iso.gz
|
| 26 |
+
|
| 27 |
+
# 4. Download OVMF Firmware Files
|
| 28 |
+
RUN wget "https://raw.githubusercontent.com/kholia/OSX-KVM/master/OVMF_CODE_4M.fd" -O /vm/OVMF_CODE.fd && \
|
| 29 |
+
wget "https://raw.githubusercontent.com/kholia/OSX-KVM/master/OVMF_VARS-1920x1080.fd" -O /vm/OVMF_VARS.fd
|
| 30 |
+
|
| 31 |
+
# 4. Copy Source QCOW2 Image (Read-Only Source)
|
| 32 |
+
COPY mac15-image/mac15.qcow2 /vm/source.qcow2
|
| 33 |
+
|
| 34 |
+
# 5. Copy the Entrypoint Script
|
| 35 |
+
COPY entrypoint.sh /scripts/entrypoint.sh
|
| 36 |
+
RUN chmod +x /scripts/entrypoint.sh
|
| 37 |
+
|
| 38 |
+
# 6. Expose Necessary Ports
|
| 39 |
+
EXPOSE 5900 4000 4444 2222 8006 9090
|
| 40 |
+
|
| 41 |
+
# 7. Define Entrypoint
|
| 42 |
+
ENTRYPOINT ["/scripts/entrypoint.sh"]
|