summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-09-02 10:42:40 +0300
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-09-03 18:26:58 +0300
commit3bf2fc3dfbbbd5a6f5ff0fc8b417ee25e0f338b9 (patch)
tree6d126a2d33cdc80cb92c00fd89c12828f5bc8982
parent764c858dd5362058ce865c178dc2f19bb8809e70 (diff)
Dockerfile: Clean package manager caches and squash images
To save some space and bandwidth. Without --squash the caches would get cleaned up only from the last layer which would save us nothing. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
-rwxr-xr-x.gitlab-ci/pull-or-rebuild.sh2
-rw-r--r--Dockerfile.build-debian2
-rw-r--r--Dockerfile.build-debian-arm642
-rw-r--r--Dockerfile.build-debian-armhf2
-rw-r--r--Dockerfile.build-debian-minimal2
-rw-r--r--Dockerfile.build-debian-mips2
-rw-r--r--Dockerfile.build-fedora2
7 files changed, 13 insertions, 1 deletions
diff --git a/.gitlab-ci/pull-or-rebuild.sh b/.gitlab-ci/pull-or-rebuild.sh
index 3d71e8210..7b3bb84ca 100755
--- a/.gitlab-ci/pull-or-rebuild.sh
+++ b/.gitlab-ci/pull-or-rebuild.sh
@@ -44,7 +44,7 @@ if [ "$TYPE" = "base" ]; then
echo "Skipping, already built"
else
echo "Building!"
- podman build --build-arg=CI_COMMIT_SHA=$CI_COMMIT_SHA -t $DOCKERNAME -f $DOCKERFILE .
+ podman build --squash --build-arg=CI_COMMIT_SHA=$CI_COMMIT_SHA -t $DOCKERNAME -f $DOCKERFILE .
podman push $DOCKERNAME
fi
diff --git a/Dockerfile.build-debian b/Dockerfile.build-debian
index 13553c5a9..de2adca63 100644
--- a/Dockerfile.build-debian
+++ b/Dockerfile.build-debian
@@ -23,3 +23,5 @@ RUN apt-get install -y \
xutils-dev \
libtool \
make
+
+RUN apt-get clean
diff --git a/Dockerfile.build-debian-arm64 b/Dockerfile.build-debian-arm64
index c9fb28c80..3ea97807f 100644
--- a/Dockerfile.build-debian-arm64
+++ b/Dockerfile.build-debian-arm64
@@ -37,3 +37,5 @@ RUN apt-get install -t stretch-backports -y \
libdrm-dev:arm64 \
qemu-user \
qemu-user-static
+
+RUN apt-get clean
diff --git a/Dockerfile.build-debian-armhf b/Dockerfile.build-debian-armhf
index 3a133d849..3e429e2f1 100644
--- a/Dockerfile.build-debian-armhf
+++ b/Dockerfile.build-debian-armhf
@@ -37,3 +37,5 @@ RUN apt-get install -t stretch-backports -y \
libdrm-dev:armhf \
qemu-user \
qemu-user-static
+
+RUN apt-get clean
diff --git a/Dockerfile.build-debian-minimal b/Dockerfile.build-debian-minimal
index 63844694d..7c23ffc2a 100644
--- a/Dockerfile.build-debian-minimal
+++ b/Dockerfile.build-debian-minimal
@@ -23,3 +23,5 @@ RUN apt-get install -y \
RUN apt-get install -t stretch-backports -y \
meson \
libdrm-dev
+
+RUN apt-get clean
diff --git a/Dockerfile.build-debian-mips b/Dockerfile.build-debian-mips
index ee29f5f4c..e56e7e751 100644
--- a/Dockerfile.build-debian-mips
+++ b/Dockerfile.build-debian-mips
@@ -37,3 +37,5 @@ RUN apt-get install -t stretch-backports -y \
libdrm-dev:mips \
qemu-user \
qemu-user-static
+
+RUN apt-get clean
diff --git a/Dockerfile.build-fedora b/Dockerfile.build-fedora
index 1a19d5875..f5566b409 100644
--- a/Dockerfile.build-fedora
+++ b/Dockerfile.build-fedora
@@ -42,3 +42,5 @@ RUN dnf install -y findutils
# Meson version switching shenanigans
RUN curl -o "/usr/src/#1" "https://files.pythonhosted.org/packages/c0/9b/44cdb8adcbb186be6cba5c93718d0c68f177b0e8082ae00cafa63a1d3535/{meson-0.47.0.tar.gz}"
+
+RUN dnf clean all