golang.org/x/net@v0.25.1-0.20240516223405-c87a5b62e243/internal/quic/cmd/interop/Dockerfile (about) 1 FROM martenseemann/quic-network-simulator-endpoint:latest AS builder 2 3 ARG TARGETPLATFORM 4 RUN echo "TARGETPLATFORM: ${TARGETPLATFORM}" 5 6 RUN apt-get update && apt-get install -y wget tar git 7 8 ENV GOVERSION=1.21.1 9 10 RUN 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 16 ENV PATH="/go/bin:${PATH}" 17 18 RUN git clone https://go.googlesource.com/net 19 20 WORKDIR /net 21 RUN go build -o /interop ./internal/quic/cmd/interop 22 23 FROM martenseemann/quic-network-simulator-endpoint:latest 24 25 WORKDIR /go-x-net 26 27 COPY --from=builder /interop ./ 28 29 # copy run script and run it 30 COPY run_endpoint.sh . 31 RUN chmod +x run_endpoint.sh 32 ENTRYPOINT [ "./run_endpoint.sh" ]