forked from quic-go/quic-go
use a multistage Docker build
This significantly reduces the file size of the resulting Docker image.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
FROM martenseemann/quic-network-simulator-endpoint:latest
|
||||
FROM martenseemann/quic-network-simulator-endpoint:latest AS builder
|
||||
|
||||
RUN apt-get update && apt-get install -y wget tar git vim python
|
||||
RUN apt-get update && apt-get install -y wget tar git
|
||||
|
||||
RUN wget https://dl.google.com/go/go1.13.3.linux-amd64.tar.gz && \
|
||||
tar xfz go1.13.3.linux-amd64.tar.gz && \
|
||||
@@ -18,6 +18,17 @@ RUN git clone https://github.com/lucas-clemente/quic-go && \
|
||||
|
||||
WORKDIR /quic-go
|
||||
|
||||
RUN go build -o server interop/server/main.go && \
|
||||
go build -o client interop/client/main.go
|
||||
|
||||
|
||||
FROM martenseemann/quic-network-simulator-endpoint:latest
|
||||
|
||||
WORKDIR /quic-go
|
||||
|
||||
COPY --from=builder /quic-go/internal/testdata/cert.pem /quic-go/internal/testdata/priv.key internal/testdata/
|
||||
COPY --from=builder /quic-go/server /quic-go/client ./
|
||||
|
||||
COPY run_endpoint.sh .
|
||||
RUN chmod +x run_endpoint.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user