qemu
This commit is contained in:
parent
a7bb1c2a4b
commit
21c12a34f7
1 changed files with 1 additions and 37 deletions
38
Dockerfile
38
Dockerfile
|
@ -1,27 +1,11 @@
|
||||||
FROM golang:1.20 AS builder
|
|
||||||
|
|
||||||
COPY serial/ /src/serial/
|
|
||||||
WORKDIR /src/serial
|
|
||||||
|
|
||||||
RUN go get -d -v golang.org/x/net/html
|
|
||||||
RUN go get -d -v github.com/gorilla/mux
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /src/serial/main .
|
|
||||||
|
|
||||||
FROM debian:bookworm-20230320-slim
|
FROM debian:bookworm-20230320-slim
|
||||||
|
|
||||||
RUN apt-get update && apt-get -y upgrade && \
|
RUN apt-get update && apt-get -y upgrade && \
|
||||||
apt-get --no-install-recommends -y install \
|
apt-get --no-install-recommends -y install \
|
||||||
jq \
|
|
||||||
curl \
|
|
||||||
cpio \
|
|
||||||
wget \
|
wget \
|
||||||
unzip \
|
|
||||||
procps \
|
|
||||||
dnsmasq \
|
dnsmasq \
|
||||||
iptables \
|
iptables \
|
||||||
iproute2 \
|
iproute2 \
|
||||||
xz-utils \
|
|
||||||
btrfs-progs \
|
|
||||||
bridge-utils \
|
bridge-utils \
|
||||||
netcat-openbsd \
|
netcat-openbsd \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
|
@ -32,42 +16,22 @@ COPY run.sh /run/
|
||||||
COPY disk.sh /run/
|
COPY disk.sh /run/
|
||||||
COPY power.sh /run/
|
COPY power.sh /run/
|
||||||
COPY serial.sh /run/
|
COPY serial.sh /run/
|
||||||
COPY server.sh /run/
|
|
||||||
COPY install.sh /run/
|
COPY install.sh /run/
|
||||||
COPY network.sh /run/
|
COPY network.sh /run/
|
||||||
|
|
||||||
COPY agent/agent.sh /agent/
|
|
||||||
COPY agent/service.sh /agent/
|
|
||||||
|
|
||||||
COPY --from=builder /src/serial/main /run/serial.bin
|
|
||||||
|
|
||||||
RUN ["chmod", "+x", "/run/run.sh"]
|
RUN ["chmod", "+x", "/run/run.sh"]
|
||||||
RUN ["chmod", "+x", "/run/disk.sh"]
|
|
||||||
RUN ["chmod", "+x", "/run/power.sh"]
|
|
||||||
RUN ["chmod", "+x", "/run/serial.sh"]
|
|
||||||
RUN ["chmod", "+x", "/run/server.sh"]
|
|
||||||
RUN ["chmod", "+x", "/run/install.sh"]
|
RUN ["chmod", "+x", "/run/install.sh"]
|
||||||
RUN ["chmod", "+x", "/run/network.sh"]
|
|
||||||
RUN ["chmod", "+x", "/run/serial.bin"]
|
|
||||||
|
|
||||||
COPY disks/template.img.xz /data/
|
|
||||||
|
|
||||||
VOLUME /storage
|
VOLUME /storage
|
||||||
|
|
||||||
EXPOSE 22
|
EXPOSE 22
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
EXPOSE 139
|
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
EXPOSE 445
|
|
||||||
EXPOSE 5000
|
|
||||||
EXPOSE 5001
|
|
||||||
|
|
||||||
ENV CPU_CORES 1
|
ENV CPU_CORES 1
|
||||||
ENV DISK_SIZE 16G
|
ENV DISK_SIZE 16G
|
||||||
ENV RAM_SIZE 512M
|
ENV RAM_SIZE 512M
|
||||||
|
|
||||||
#ENV URL https://global.synologydownload.com/download/DSM/beta/7.2/64216/DSM_VirtualDSM_64216.pat
|
ENV BOOT https://ftp.halifax.rwth-aachen.de/osdn/clonezilla/78259/clonezilla-live-3.0.3-22-amd64.iso
|
||||||
#ENV URL https://global.synologydownload.com/download/DSM/release/7.0.1/42218/DSM_VirtualDSM_42218.pat
|
|
||||||
ENV URL https://global.synologydownload.com/download/DSM/release/7.1.1/42962-1/DSM_VirtualDSM_42962.pat
|
|
||||||
|
|
||||||
ENTRYPOINT ["/run/run.sh"]
|
ENTRYPOINT ["/run/run.sh"]
|
||||||
|
|
Loading…
Reference in a new issue