fuckeduppdp/docker/Dockerfile

29 lines
1.3 KiB
Docker
Raw Normal View History

# Build container
2023-10-26 01:25:51 +00:00
FROM debian:11-slim AS builder
2023-10-30 19:50:03 +00:00
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install --no-install-recommends build-essential ca-certificates curl gcc libpcap-dev libvdeplug-dev && apt-get clean
ARG SIMH_VERSION=3.9-0
RUN curl -L https://github.com/simh/simh/archive/refs/tags/v${SIMH_VERSION}.tar.gz|tar -xzC /
WORKDIR /simh-${SIMH_VERSION}
RUN make pdp11 && ln /simh-${SIMH_VERSION}/BIN/pdp11 /pdp11
2023-10-26 01:25:51 +00:00
# Final container
2023-10-26 01:25:51 +00:00
FROM debian:11-slim
ENV DISK_FILENAME=rq0.dsk
2023-10-30 19:50:03 +00:00
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install --no-install-recommends ca-certificates curl ed iproute2 iptables libpcap-dev net-tools telnet vdeplug
# Add Tini to handle reaping processes
2023-10-30 19:50:03 +00:00
ARG TINI_VERSION=0.19.0
ADD https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]
# Add CoreDNS to forward DNS based on /etc/resolv.conf
2023-10-30 19:50:03 +00:00
ARG COREDNS_VERSION=1.11.1
RUN curl -L https://github.com/coredns/coredns/releases/download/v${COREDNS_VERSION}/coredns_${COREDNS_VERSION}_linux_amd64.tgz|tar -xzC /usr/local/bin/
2023-10-30 19:50:03 +00:00
COPY --from=builder /pdp11 /usr/local/bin/pdp11
# Uses pattern matching to optionally copy rq0.dsk.gz if it exists
COPY startup.sh Corefile boot.ini.template rq0.dsk.g[z] /
CMD ["/startup.sh"]