Loading Dockerfile +5 −7 Original line number Diff line number Diff line FROM golang:1.16 AS builder COPY vdsm-serial/ /src/vdsm-serial/ WORKDIR /src/vdsm-serial COPY serial/ /src/serial/ WORKDIR /src/serial RUN go get -d -v golang.org/x/net/html RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /src/vdsm-serial/main . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /src/serial/main . FROM debian:bullseye-20230109-slim Loading @@ -28,7 +28,7 @@ COPY qemu-ifdown /run/ COPY qemu-ifup /run/ COPY run.sh /run/ COPY server.sh /run/ COPY --from=builder /src/vdsm-serial/main /run/serial.bin COPY --from=builder /src/serial/main /run/serial.bin RUN ["chmod", "+x", "/run/generate-dhcpd-conf"] RUN ["chmod", "+x", "/run/qemu-ifdown"] Loading @@ -48,6 +48,7 @@ VOLUME /images EXPOSE 5000 EXPOSE 5001 ENV RAM_SIZE 512M ENV DISK_SIZE 16G ENV URL https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM_VirtualDSM_42218.pat Loading @@ -57,6 +58,3 @@ ENV URL https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM ENTRYPOINT ["/run/run.sh"] # Mostly users will probably want to configure memory usage. CMD ["-m", "512M"] run.sh +1 −1 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ echo "Booting OS..." # -enable-kvm: Use KVM for this VM (much faster for our case). # -nographic: disable SDL graphics. # -serial mon:stdio: use "monitored stdio" as our serial output. exec qemu-system-x86_64 -name Synology -enable-kvm -nographic -serial mon:stdio \ exec qemu-system-x86_64 -name Synology -m $RAM_SIZE -enable-kvm -nographic -serial mon:stdio \ "$@" \ -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 \ -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,host=127.0.0.1,port=12345,reconnect=10 \ Loading vdsm-serial/doc.go→serial/doc.go +0 −0 File moved. View file vdsm-serial/go.mod→serial/go.mod +0 −0 File moved. View file vdsm-serial/go.sum→serial/go.sum +0 −0 File moved. View file Loading
Dockerfile +5 −7 Original line number Diff line number Diff line FROM golang:1.16 AS builder COPY vdsm-serial/ /src/vdsm-serial/ WORKDIR /src/vdsm-serial COPY serial/ /src/serial/ WORKDIR /src/serial RUN go get -d -v golang.org/x/net/html RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /src/vdsm-serial/main . RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /src/serial/main . FROM debian:bullseye-20230109-slim Loading @@ -28,7 +28,7 @@ COPY qemu-ifdown /run/ COPY qemu-ifup /run/ COPY run.sh /run/ COPY server.sh /run/ COPY --from=builder /src/vdsm-serial/main /run/serial.bin COPY --from=builder /src/serial/main /run/serial.bin RUN ["chmod", "+x", "/run/generate-dhcpd-conf"] RUN ["chmod", "+x", "/run/qemu-ifdown"] Loading @@ -48,6 +48,7 @@ VOLUME /images EXPOSE 5000 EXPOSE 5001 ENV RAM_SIZE 512M ENV DISK_SIZE 16G ENV URL https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM_VirtualDSM_42218.pat Loading @@ -57,6 +58,3 @@ ENV URL https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM ENTRYPOINT ["/run/run.sh"] # Mostly users will probably want to configure memory usage. CMD ["-m", "512M"]
run.sh +1 −1 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ echo "Booting OS..." # -enable-kvm: Use KVM for this VM (much faster for our case). # -nographic: disable SDL graphics. # -serial mon:stdio: use "monitored stdio" as our serial output. exec qemu-system-x86_64 -name Synology -enable-kvm -nographic -serial mon:stdio \ exec qemu-system-x86_64 -name Synology -m $RAM_SIZE -enable-kvm -nographic -serial mon:stdio \ "$@" \ -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 \ -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,host=127.0.0.1,port=12345,reconnect=10 \ Loading