docker-qemu-reactos/Dockerfile

79 lines
2.6 KiB
Docker
Raw Normal View History

2019-11-02 10:34:53 +00:00
##################################################
## "qemu-reactos" stage
##################################################
2020-06-10 20:35:55 +00:00
FROM docker.io/ubuntu:20.04 AS qemu-reactos
2019-02-20 22:10:38 +00:00
# Environment
ENV QEMU_CPU=2
ENV QEMU_RAM=1024M
ENV QEMU_DISK_SIZE=16G
ENV QEMU_DISK_FORMAT=qcow2
ENV QEMU_KEYBOARD=en-us
2019-09-21 09:04:46 +00:00
ENV QEMU_NET_DEVICE=e1000
2019-03-07 20:50:38 +00:00
ENV QEMU_NET_OPTIONS=hostfwd=tcp::13389-:3389,hostfwd=tcp::15900-:5900
ENV QEMU_BOOT_ORDER=cd
ENV QEMU_BOOT_MENU=off
2019-02-20 22:10:38 +00:00
ENV QEMU_KVM=false
# Install system packages
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
net-tools \
2019-05-05 15:17:40 +00:00
procps \
2019-09-15 18:55:14 +00:00
python3 \
python3-numpy \
2019-02-20 22:10:38 +00:00
qemu-kvm \
qemu-system-x86 \
qemu-utils \
runit \
unzip \
&& rm -rf /var/lib/apt/lists/*
2019-09-15 18:55:14 +00:00
# Install noVNC
ARG NOVNC_VERSION=v1.1.0
ARG NOVNC_TARBALL_URL=https://github.com/novnc/noVNC/archive/${NOVNC_VERSION}.tar.gz
2019-09-21 09:03:30 +00:00
ARG NOVNC_TARBALL_CHECKSUM=2c63418b624a221a28cac7b9a7efecc092b695fc1b7dd88255b074ab32bc72a7
RUN mkdir -p /opt/novnc/ \
&& curl -Lo /tmp/novnc.tgz "${NOVNC_TARBALL_URL:?}" \
&& printf '%s' "${NOVNC_TARBALL_CHECKSUM:?} /tmp/novnc.tgz" | sha256sum -c \
&& tar -xzf /tmp/novnc.tgz --strip-components=1 -C /opt/novnc/ \
&& rm -f /tmp/novnc.tgz
2019-09-15 18:55:14 +00:00
# Install Websockify
ARG WEBSOCKIFY_VERSION=v0.9.0
ARG WEBSOCKIFY_TARBALL_URL=https://github.com/novnc/websockify/archive/${WEBSOCKIFY_VERSION}.tar.gz
2019-09-21 09:03:30 +00:00
ARG WEBSOCKIFY_TARBALL_CHECKSUM=6ebfec791dd78be6584fb5fe3bc27f02af54501beddf8457368699f571de13ae
RUN mkdir -p /opt/novnc/utils/websockify/ \
&& curl -Lo /tmp/websockify.tgz "${WEBSOCKIFY_TARBALL_URL:?}" \
&& printf '%s' "${WEBSOCKIFY_TARBALL_CHECKSUM:?} /tmp/websockify.tgz" | sha256sum -c \
&& tar -xzf /tmp/websockify.tgz --strip-components=1 -C /opt/novnc/utils/websockify/ \
&& rm -f /tmp/websockify.tgz
2019-02-20 22:10:38 +00:00
# Download ReactOS ISO
2020-04-09 10:56:34 +00:00
ARG REACTOS_ISO_URL=https://downloads.sourceforge.net/project/reactos/ReactOS/0.4.13/ReactOS-0.4.13-iso.zip
ARG REACTOS_ISO_CHECKSUM=5bd27a9f9af4589ca1683795775c747a96c5a45fcb570f543d5370f55c079ae6
2019-09-21 09:03:30 +00:00
RUN mkdir -p /tmp/reactos/ /var/lib/qemu/iso/ /var/lib/qemu/images/ \
&& curl -Lo /tmp/reactos/reactos.zip "${REACTOS_ISO_URL:?}" \
2019-09-21 09:03:30 +00:00
&& printf '%s' "${REACTOS_ISO_CHECKSUM:?} /tmp/reactos/reactos.zip" | sha256sum -c \
2019-02-20 22:10:38 +00:00
&& unzip /tmp/reactos/reactos.zip -d /tmp/reactos/ \
&& mv /tmp/reactos/*.iso /var/lib/qemu/iso/reactos.iso \
&& rm -rf /tmp/reactos/
# Copy services
2020-05-22 15:00:57 +00:00
COPY --chown=root:root ./scripts/service/ /etc/service/
2019-02-20 22:10:38 +00:00
# Copy scripts
2020-05-22 15:00:57 +00:00
COPY --chown=root:root ./scripts/bin/ /usr/local/bin/
2019-02-20 22:10:38 +00:00
2019-03-07 20:50:38 +00:00
# Expose ports
## VNC
EXPOSE 5900/tcp
## noVNC
2019-02-20 22:10:38 +00:00
EXPOSE 6080/tcp
CMD ["/usr/local/bin/container-foreground-cmd"]