docker: clean apt cache after installing, for smaller images

This commit is contained in:
mappu 2024-10-19 10:32:17 +13:00
parent 360696cff8
commit 8a64c7c926
5 changed files with 10 additions and 5 deletions

View File

@ -1,4 +1,5 @@
FROM debian:bookworm FROM debian:bookworm
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -qyy golang-go qtbase5-dev apt-get install -qyy golang-go qtbase5-dev && \
apt-get clean

View File

@ -1,7 +1,8 @@
FROM debian:bookworm FROM debian:bookworm
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -qyy gnupg2 golang-go ca-certificates apt-get install -qyy gnupg2 golang-go ca-certificates && \
apt-get clean
RUN DEBIAN_FRONTEND=noninteractive \ RUN DEBIAN_FRONTEND=noninteractive \
echo "deb https://pkg.mxe.cc/repos/apt buster main" >/etc/apt/sources.list.d/mxeapt.list && \ echo "deb https://pkg.mxe.cc/repos/apt buster main" >/etc/apt/sources.list.d/mxeapt.list && \

View File

@ -1,7 +1,8 @@
FROM debian:bookworm FROM debian:bookworm
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -qyy gnupg2 golang-go ca-certificates apt-get install -qyy gnupg2 golang-go ca-certificates && \
apt-get clean
RUN DEBIAN_FRONTEND=noninteractive \ RUN DEBIAN_FRONTEND=noninteractive \
echo "deb https://pkg.mxe.cc/repos/apt buster main" >/etc/apt/sources.list.d/mxeapt.list && \ echo "deb https://pkg.mxe.cc/repos/apt buster main" >/etc/apt/sources.list.d/mxeapt.list && \

View File

@ -1,7 +1,8 @@
FROM golang:1.23-bookworm FROM golang:1.23-bookworm
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -qyy gnupg2 ca-certificates apt-get install -qyy gnupg2 ca-certificates && \
apt-get clean
RUN DEBIAN_FRONTEND=noninteractive \ RUN DEBIAN_FRONTEND=noninteractive \
echo "deb https://pkg.mxe.cc/repos/apt buster main" >/etc/apt/sources.list.d/mxeapt.list && \ echo "deb https://pkg.mxe.cc/repos/apt buster main" >/etc/apt/sources.list.d/mxeapt.list && \

View File

@ -1,7 +1,8 @@
FROM golang:1.23-bookworm FROM golang:1.23-bookworm
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -qyy gnupg2 ca-certificates apt-get install -qyy gnupg2 ca-certificates && \
apt-get clean
RUN DEBIAN_FRONTEND=noninteractive \ RUN DEBIAN_FRONTEND=noninteractive \
echo "deb https://pkg.mxe.cc/repos/apt buster main" >/etc/apt/sources.list.d/mxeapt.list && \ echo "deb https://pkg.mxe.cc/repos/apt buster main" >/etc/apt/sources.list.d/mxeapt.list && \