...
1FROM martenseemann/quic-network-simulator-endpoint:latest AS builder
2
3ARG TARGETPLATFORM
4RUN echo "TARGETPLATFORM: ${TARGETPLATFORM}"
5
6RUN apt-get update && apt-get install -y wget tar git
7
8ENV GOVERSION=1.21.1
9
10RUN platform=$(echo ${TARGETPLATFORM} | tr '/' '-') && \
11 filename="go${GOVERSION}.${platform}.tar.gz" && \
12 wget --no-verbose https://dl.google.com/go/${filename} && \
13 tar xfz ${filename} && \
14 rm ${filename}
15
16ENV PATH="/go/bin:${PATH}"
17
18RUN git clone https://go.googlesource.com/net
19
20WORKDIR /net
21RUN go build -o /interop ./internal/quic/cmd/interop
22
23FROM martenseemann/quic-network-simulator-endpoint:latest
24
25WORKDIR /go-x-net
26
27COPY --from=builder /interop ./
28
29# copy run script and run it
30COPY run_endpoint.sh .
31RUN chmod +x run_endpoint.sh
32ENTRYPOINT [ "./run_endpoint.sh" ]
View as plain text