2023-04-26 10:37:22 +07:00
|
|
|
FROM qemux/qemu-host AS host
|
2023-04-23 23:56:24 +07:00
|
|
|
FROM debian:bookworm-slim
|
2019-03-11 14:35:19 +07:00
|
|
|
|
2023-04-24 01:20:47 +07:00
|
|
|
ARG DEBCONF_NOWARNINGS="yes"
|
|
|
|
ARG DEBIAN_FRONTEND noninteractive
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get -y upgrade && \
|
2023-04-26 18:38:45 +07:00
|
|
|
apt-get --no-install-recommends -y install \
|
|
|
|
curl \
|
|
|
|
cpio \
|
|
|
|
wget \
|
|
|
|
fdisk \
|
|
|
|
unzip \
|
|
|
|
procps \
|
|
|
|
xz-utils \
|
|
|
|
iptables \
|
|
|
|
iproute2 \
|
|
|
|
dnsmasq \
|
|
|
|
net-tools \
|
|
|
|
btrfs-progs \
|
|
|
|
ca-certificates \
|
|
|
|
isc-dhcp-client \
|
|
|
|
netcat-openbsd \
|
|
|
|
qemu-system-x86 \
|
2019-03-11 14:35:19 +07:00
|
|
|
&& apt-get clean
|
|
|
|
|
2023-04-16 18:33:42 +07:00
|
|
|
COPY run/*.sh /run/
|
|
|
|
COPY agent/*.sh /agent/
|
2023-03-30 23:18:41 +07:00
|
|
|
|
2023-04-26 10:37:22 +07:00
|
|
|
COPY --from=host /qemu-host.bin /run/host.bin
|
2019-03-11 14:35:19 +07:00
|
|
|
|
2023-03-27 01:29:21 +07:00
|
|
|
RUN ["chmod", "+x", "/run/run.sh"]
|
2023-04-21 13:12:29 +07:00
|
|
|
RUN ["chmod", "+x", "/run/check.sh"]
|
2023-03-28 00:21:49 +07:00
|
|
|
RUN ["chmod", "+x", "/run/server.sh"]
|
2023-04-26 10:37:22 +07:00
|
|
|
RUN ["chmod", "+x", "/run/host.bin"]
|
2023-03-27 01:29:21 +07:00
|
|
|
|
2023-03-28 11:48:35 +07:00
|
|
|
VOLUME /storage
|
2019-03-11 14:35:19 +07:00
|
|
|
|
2023-03-28 11:48:35 +07:00
|
|
|
EXPOSE 22
|
|
|
|
EXPOSE 80
|
|
|
|
EXPOSE 139
|
|
|
|
EXPOSE 443
|
|
|
|
EXPOSE 445
|
2023-03-27 01:29:21 +07:00
|
|
|
EXPOSE 5000
|
|
|
|
|
2023-04-18 23:42:16 +07:00
|
|
|
ENV CPU_CORES "1"
|
|
|
|
ENV DISK_SIZE "16G"
|
|
|
|
ENV RAM_SIZE "512M"
|
2023-03-28 03:25:47 +07:00
|
|
|
|
2023-04-21 10:54:58 +07:00
|
|
|
ARG DATE_ARG=""
|
2023-04-17 23:48:38 +07:00
|
|
|
ARG BUILD_ARG=0
|
|
|
|
ARG VERSION_ARG="0.0"
|
2023-04-17 02:21:08 +07:00
|
|
|
ENV VERSION=$VERSION_ARG
|
|
|
|
|
2023-04-21 10:54:58 +07:00
|
|
|
LABEL org.opencontainers.image.created=${DATE_ARG}
|
|
|
|
LABEL org.opencontainers.image.revision=${BUILD_ARG}
|
|
|
|
LABEL org.opencontainers.image.version=${VERSION_ARG}
|
|
|
|
LABEL org.opencontainers.image.source=https://github.com/kroese/virtual-dsm/
|
2023-04-26 10:37:22 +07:00
|
|
|
LABEL org.opencontainers.image.url=https://hub.docker.com/r/kroese/virtual-dsm/
|
2023-04-21 10:54:58 +07:00
|
|
|
|
2023-04-21 13:12:29 +07:00
|
|
|
HEALTHCHECK --interval=30s --retries=1 CMD /run/check.sh
|
2023-04-16 22:27:50 +07:00
|
|
|
|
2019-03-11 14:35:19 +07:00
|
|
|
ENTRYPOINT ["/run/run.sh"]
|