Optimize size of utp-test-app docker file (#955)

This commit is contained in:
KonradStaniec 2022-02-04 14:49:29 +01:00 committed by GitHub
parent cf249109fa
commit 6869eafce6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 3 deletions

View File

@ -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