diff --git a/Dockerfile b/Dockerfile index c0b1c758b..1361ba429 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,11 +31,17 @@ ENV GOARCH=arm64 CGO_CFLAGS="-I/work/libpcap" # Install Go RUN curl https://go.dev/dl/go1.16.13.linux-amd64.tar.gz -Lo ./go.linux-amd64.tar.gz +RUN curl https://go.dev/dl/go1.16.13.linux-amd64.tar.gz.asc -Lo ./go.linux-amd64.tar.gz.asc +RUN curl https://dl.google.com/dl/linux/linux_signing_key.pub -Lo linux_signing_key.pub +RUN gpg --import linux_signing_key.pub && gpg --verify ./go.linux-amd64.tar.gz.asc ./go.linux-amd64.tar.gz RUN rm -rf /usr/local/go && tar -C /usr/local -xzf go.linux-amd64.tar.gz ENV PATH "$PATH:/usr/local/go/bin" -# Compile libpcap +# Compile libpcap from source RUN curl https://www.tcpdump.org/release/libpcap-1.10.1.tar.gz -Lo ./libpcap.tar.gz +RUN curl https://www.tcpdump.org/release/libpcap-1.10.1.tar.gz.sig -Lo ./libpcap.tar.gz.sig +RUN curl https://www.tcpdump.org/release/signing-key.asc -Lo ./signing-key.asc +RUN gpg --import signing-key.asc && gpg --verify libpcap.tar.gz.sig libpcap.tar.gz RUN tar -xzf libpcap.tar.gz && mv ./libpcap-* ./libpcap RUN cd ./libpcap && ./configure --host=arm && make RUN cp /work/libpcap/libpcap.a /usr/xcc/aarch64-linux-musl-cross/lib/gcc/aarch64-linux-musl/*/