Dockerfile: use apt instead of apt-get and run clean

The main tool to manage packages changed from apt-get to apt. To reduce the
size of the container, cleanup apt's download cache.
This commit is contained in:
Jörg Sommer 2023-06-28 17:46:57 +02:00
parent e584896f5a
commit c1ba82f20a
2 changed files with 6 additions and 4 deletions

View File

@ -3,8 +3,9 @@ ARG IMAGE_ARCH=linux/arm
ARG IMAGE_TAG=2-bullseye ARG IMAGE_TAG=2-bullseye
FROM --platform=$IMAGE_ARCH torizon/debian:$IMAGE_TAG FROM --platform=$IMAGE_ARCH torizon/debian:$IMAGE_TAG
RUN apt-get update \ RUN apt update \
&& apt-get install -y --no-install-recommends gnuplot rt-tests \ && apt install -y --no-install-recommends gnuplot rt-tests \
&& apt clean
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY rt-tests.sh /rt-tests.sh COPY rt-tests.sh /rt-tests.sh

View File

@ -3,8 +3,9 @@ ARG IMAGE_ARCH=linux/arm
ARG IMAGE_TAG=2-bullseye ARG IMAGE_TAG=2-bullseye
FROM --platform=$IMAGE_ARCH torizon/debian:$IMAGE_TAG FROM --platform=$IMAGE_ARCH torizon/debian:$IMAGE_TAG
RUN apt-get update \ RUN apt update \
&& apt-get install -y --no-install-recommends iperf3 rt-tests iputils-ping \ && apt install -y --no-install-recommends iperf3 rt-tests iputils-ping \
&& apt clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY stress-tests.sh /stress-tests.sh COPY stress-tests.sh /stress-tests.sh