Optimize size of utp-test-app docker file (#955)
This commit is contained in:
parent
cf249109fa
commit
6869eafce6
|
@ -1,7 +1,9 @@
|
|||
FROM ubuntu:20.04
|
||||
FROM debian:buster-slim AS build
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y build-essential wget net-tools iputils-ping tcpdump ethtool iperf iproute2 make git libpcre3-dev librocksdb-dev curl
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --fix-missing build-essential make git libpcre3-dev librocksdb-dev \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
ARG BRANCH_NAME=master
|
||||
ENV NPROC=2
|
||||
|
@ -16,6 +18,15 @@ RUN cd nimbus-eth1 && \
|
|||
make -j${NPROC} NIMFLAGS="--parallelBuild:${NPROC}" utp-test-app && \
|
||||
mv build/utp_test_app /bin/
|
||||
|
||||
FROM debian:buster-slim AS deploy
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y ethtool net-tools \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
COPY --from=build /bin/utp_test_app /bin/utp_test_app
|
||||
|
||||
COPY setup.sh .
|
||||
RUN chmod +x setup.sh
|
||||
|
||||
|
|
Loading…
Reference in New Issue