使用docker编译

FROM alpine:3.9.2
RUN sed -i "s|http://dl-cdn.alpinelinux.org|https://mirrors.aliyun.com|g" /etc/apk/repositories \
    && apk add gcc g++ make automake libpcap-dev
#ADD tcpdump-4.9.2.tar.gz /opt
WORKDIR /opt
RUN wget http://www.tcpdump.org/release/tcpdump-4.9.2.tar.gz \
    && tar -xvf tcpdump-4.9.2.tar.gz
RUN cd tcpdump-4.9.2 && CFLAGS=-static ./configure --without-crypto && make
RUN mv tcpdump-4.9.2/tcpdump /static-tcpdump \
        && rm -rf tcpdump-4.9.2 tcpdump-4.9.2.tar.gz

相关文章:

  • 2021-04-01
  • 2021-11-03
  • 2022-01-17
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2021-05-13
  • 2021-06-23
猜你喜欢
  • 2022-12-23
  • 2021-05-06
  • 2021-09-08
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
相关资源
相似解决方案