github.com/tumi8/quic-go@v0.37.4-tum/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.20.2 9 10 RUN platform=$(echo ${TARGETPLATFORM} | tr '/' '-') && \ 11 filename="go${GOVERSION}.${platform}.tar.gz" && \ 12 wget https://dl.google.com/go/${filename} && \ 13 tar xfz ${filename} && \ 14 rm ${filename} 15 16 ENV PATH="/go/bin:${PATH}" 17 18 # build with --build-arg CACHEBUST=$(date +%s) 19 ARG CACHEBUST=1 20 21 RUN git clone https://github.com/tumi8/quic-go && \ 22 cd quic-go && \ 23 git fetch origin interop && git checkout -t origin/interop && \ 24 go get ./... 25 26 WORKDIR /quic-go 27 28 RUN git rev-parse HEAD > commit.txt 29 RUN go build -o server -ldflags="-X github.com/tumi8/quic-go/qlog.quicGoVersion=$(git describe --always --long --dirty)" interop/server/main.go 30 RUN go build -o client -ldflags="-X github.com/tumi8/quic-go/qlog.quicGoVersion=$(git describe --always --long --dirty)" interop/client/main.go 31 32 33 FROM martenseemann/quic-network-simulator-endpoint:latest 34 35 WORKDIR /quic-go 36 37 COPY --from=builder /quic-go/commit.txt /quic-go/server /quic-go/client ./ 38 39 COPY run_endpoint.sh . 40 RUN chmod +x run_endpoint.sh 41 42 ENTRYPOINT [ "./run_endpoint.sh" ]