virtual-dsm/Dockerfile

69 lines
1.7 KiB
Docker
Raw Normal View History

2023-10-05 15:51:42 +02:00
FROM qemux/qemu-host as builder
2023-04-26 20:33:19 +02:00
2023-04-27 01:16:33 +02:00
# FROM golang as builder
# WORKDIR /
# RUN git clone https://github.com/qemu-tools/qemu-host.git
# WORKDIR /qemu-host/src
# RUN go mod download
# RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /qemu-host.bin .
2023-04-26 20:33:19 +02:00
2023-10-17 19:05:22 +02:00
FROM debian:trixie-slim
2019-03-11 00:35:19 -07:00
2023-04-23 20:20:47 +02:00
ARG DEBCONF_NOWARNINGS="yes"
ARG DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -y upgrade && \
2023-05-12 13:39:55 +02:00
apt-get --no-install-recommends -y install \
2023-10-17 01:39:44 +02:00
tini \
curl \
cpio \
wget \
fdisk \
unzip \
socat \
procps \
xz-utils \
iptables \
iproute2 \
dnsmasq \
net-tools \
ca-certificates \
netcat-openbsd \
qemu-system-x86 \
2023-05-12 13:42:20 +02:00
&& apt-get clean \
2023-05-12 13:39:55 +02:00
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2023-11-20 11:45:28 +01:00
COPY ./src /run/
2023-04-27 01:16:33 +02:00
COPY --from=builder /qemu-host.bin /run/host.bin
2023-05-12 13:51:11 +02:00
RUN chmod +x /run/*.sh && chmod +x /run/*.bin
2023-03-26 20:29:21 +02:00
2023-03-28 06:48:35 +02:00
VOLUME /storage
2019-03-11 00:35:19 -07:00
2023-03-28 06:48:35 +02:00
EXPOSE 22
EXPOSE 80
EXPOSE 139
2023-03-28 06:48:35 +02:00
EXPOSE 445
2023-03-26 20:29:21 +02:00
EXPOSE 5000
2023-04-18 18:42:16 +02:00
ENV CPU_CORES "1"
ENV DISK_SIZE "16G"
ENV RAM_SIZE "512M"
2023-03-27 22:25:47 +02:00
2023-04-21 05:54:58 +02:00
ARG DATE_ARG=""
2023-04-17 18:48:38 +02:00
ARG BUILD_ARG=0
ARG VERSION_ARG="0.0"
2023-04-16 21:21:08 +02:00
ENV VERSION=$VERSION_ARG
2023-10-16 17:44:36 +02:00
LABEL org.opencontainers.image.licenses="MIT"
2023-10-17 01:39:44 +02:00
LABEL org.opencontainers.image.title="Virtual DSM"
2023-04-21 05:54:58 +02:00
LABEL org.opencontainers.image.created=${DATE_ARG}
LABEL org.opencontainers.image.revision=${BUILD_ARG}
LABEL org.opencontainers.image.version=${VERSION_ARG}
2023-10-19 15:05:20 +02:00
LABEL org.opencontainers.image.source="https://github.com/vdsm/virtual-dsm/"
2023-10-19 15:33:12 +02:00
LABEL org.opencontainers.image.url="https://hub.docker.com/r/vdsm/virtual-dsm/"
2023-10-16 17:44:36 +02:00
LABEL org.opencontainers.image.description="Virtual DSM in a docker container"
2023-04-21 05:54:58 +02:00
2023-11-20 11:45:28 +01:00
HEALTHCHECK --interval=60s --start-period=45s --retries=2 CMD /run/check.sh
2023-04-16 17:27:50 +02:00
ENTRYPOINT ["/usr/bin/tini", "-s", "/run/entry.sh"]