2023-03-29 07:04:10 +07:00
|
|
|
FROM golang:1.20 AS builder
|
2023-03-27 04:22:25 +07:00
|
|
|
|
2023-03-28 04:04:42 +07:00
|
|
|
COPY serial/ /src/serial/
|
|
|
|
WORKDIR /src/serial
|
2023-03-27 04:22:25 +07:00
|
|
|
RUN go get -d -v golang.org/x/net/html
|
2023-03-28 04:04:42 +07:00
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /src/serial/main .
|
2023-03-27 04:22:25 +07:00
|
|
|
|
2023-03-30 08:16:32 +07:00
|
|
|
FROM debian:bookworm-20230320-slim
|
2019-03-11 14:35:19 +07:00
|
|
|
|
|
|
|
RUN apt-get update && apt-get -y upgrade && \
|
|
|
|
apt-get --no-install-recommends -y install \
|
2023-03-30 08:16:32 +07:00
|
|
|
iproute2 \
|
|
|
|
jq \
|
|
|
|
wget \
|
|
|
|
unzip \
|
|
|
|
procps \
|
|
|
|
python3 \
|
|
|
|
xz-utils \
|
|
|
|
ca-certificates \
|
|
|
|
netcat-openbsd \
|
|
|
|
qemu-system-x86 \
|
|
|
|
udhcpd \
|
2019-03-11 14:35:19 +07:00
|
|
|
&& apt-get clean
|
|
|
|
|
|
|
|
COPY run.sh /run/
|
2023-04-01 23:43:53 +07:00
|
|
|
COPY agent/agent.sh /agent/
|
|
|
|
COPY agent/service.sh /agent/
|
2023-03-28 00:21:49 +07:00
|
|
|
COPY server.sh /run/
|
2023-03-28 12:24:17 +07:00
|
|
|
COPY install.sh /run/
|
2023-03-31 01:05:36 +07:00
|
|
|
COPY serial/serial.sh /run/
|
2023-03-30 23:18:41 +07:00
|
|
|
COPY qemu-ifup /run/
|
|
|
|
COPY qemu-ifdown /run/
|
|
|
|
COPY generate-dhcpd-conf /run/
|
|
|
|
|
2023-03-28 04:04:42 +07:00
|
|
|
COPY --from=builder /src/serial/main /run/serial.bin
|
2019-03-11 14:35:19 +07:00
|
|
|
|
2023-03-27 01:29:21 +07:00
|
|
|
RUN ["chmod", "+x", "/run/run.sh"]
|
2023-03-28 11:48:35 +07:00
|
|
|
RUN ["chmod", "+x", "/run/serial.sh"]
|
2023-03-28 00:21:49 +07:00
|
|
|
RUN ["chmod", "+x", "/run/server.sh"]
|
2023-03-28 12:24:17 +07:00
|
|
|
RUN ["chmod", "+x", "/run/install.sh"]
|
2023-03-30 23:18:41 +07:00
|
|
|
RUN ["chmod", "+x", "/run/qemu-ifup"]
|
|
|
|
RUN ["chmod", "+x", "/run/qemu-ifdown"]
|
|
|
|
RUN ["chmod", "+x", "/run/generate-dhcpd-conf"]
|
2023-03-27 01:29:21 +07:00
|
|
|
|
2023-03-31 00:00:10 +07:00
|
|
|
COPY extract/lib* /run/extract/
|
|
|
|
COPY extract/scemd /run/extract/syno_extract_system_patch
|
2023-04-02 01:10:40 +07:00
|
|
|
RUN ["chmod", "+x", "/run/extract/syno_extract_system_patch"]
|
2023-03-30 23:18:41 +07:00
|
|
|
|
2023-03-28 00:21:49 +07:00
|
|
|
COPY disks/template.img.xz /data/
|
|
|
|
|
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
|
|
|
|
EXPOSE 5001
|
|
|
|
|
2023-03-28 04:04:42 +07:00
|
|
|
ENV RAM_SIZE 512M
|
2023-03-28 03:44:39 +07:00
|
|
|
ENV DISK_SIZE 16G
|
2023-03-28 03:25:47 +07:00
|
|
|
|
2023-03-30 08:16:32 +07:00
|
|
|
ENV URL https://global.synologydownload.com/download/DSM/beta/7.2/64216/DSM_VirtualDSM_64216.pat
|
2023-03-28 03:25:47 +07:00
|
|
|
#ENV URL https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM_VirtualDSM_42218.pat
|
2023-03-30 08:16:32 +07:00
|
|
|
#ENV URL https://global.synologydownload.com/download/DSM/release/7.1.1/42962-1/DSM_VirtualDSM_42962.pat
|
2023-03-28 03:25:47 +07:00
|
|
|
|
2019-03-11 14:35:19 +07:00
|
|
|
ENTRYPOINT ["/run/run.sh"]
|