From: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t 6/8] Dockerfile: Clean package manager caches and squash images
Date: Tue, 3 Sep 2019 11:37:53 +0300 [thread overview]
Message-ID: <20190903083753.31540-1-arkadiusz.hiler@intel.com> (raw)
In-Reply-To: <20190903083614.31305-1-arkadiusz.hiler@intel.com>
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>
---
.gitlab-ci/pull-or-rebuild.sh | 2 +-
Dockerfile.build-debian | 2 ++
Dockerfile.build-debian-arm64 | 2 ++
Dockerfile.build-debian-armhf | 2 ++
Dockerfile.build-debian-minimal | 2 ++
Dockerfile.build-debian-mips | 2 ++
Dockerfile.build-fedora | 2 ++
7 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.gitlab-ci/pull-or-rebuild.sh b/.gitlab-ci/pull-or-rebuild.sh
index 3d71e821..7b3bb84c 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 13553c5a..de2adca6 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 c9fb28c8..3ea97807 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 3a133d84..3e429e2f 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 63844694..7c23ffc2 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 ee29f5f4..e56e7e75 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 31056a2a..d94533c6 100644
--- a/Dockerfile.build-fedora
+++ b/Dockerfile.build-fedora
@@ -42,3 +42,5 @@ RUN dnf install -y findutils
# Meson version switching shenanigans
RUN cd /usr/src && curl -O https://files.pythonhosted.org/packages/c0/9b/44cdb8adcbb186be6cba5c93718d0c68f177b0e8082ae00cafa63a1d3535/meson-0.47.0.tar.gz
+
+RUN dnf clean all
--
2.21.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-09-03 8:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 8:36 [igt-dev] [PATCH i-g-t 1/8] Dockerfile: Avoid messing with WORKDIR Arkadiusz Hiler
2019-09-03 8:36 ` [igt-dev] [PATCH i-g-t 2/8] Dockerfile: Make sure that we use correct base image Arkadiusz Hiler
2019-09-03 8:36 ` [igt-dev] [PATCH i-g-t 3/8] .gitlab-ci: Remove dead code Arkadiusz Hiler
2019-09-03 8:36 ` [igt-dev] [PATCH i-g-t 4/8] .gitalb-ci: Use only the necessary tags Arkadiusz Hiler
2019-09-03 8:36 ` [igt-dev] [PATCH i-g-t 5/8] .gitlab-ci: Switch to podman/buildah/skopeo Arkadiusz Hiler
2019-09-03 8:37 ` Arkadiusz Hiler [this message]
2019-09-03 8:38 ` [igt-dev] [PATCH i-g-t 7/8] .gitlab-ci: Don't pull images until they are needed Arkadiusz Hiler
2019-09-03 8:38 ` [igt-dev] [PATCH i-g-t 8/8] .gitlab-ci: Use true --prefix Arkadiusz Hiler
2019-09-03 9:10 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/8] Dockerfile: Avoid messing with WORKDIR Patchwork
2019-09-03 9:35 ` [igt-dev] [PATCH i-g-t 1/8] " Petri Latvala
2019-09-03 11:06 ` Arkadiusz Hiler
2019-09-03 11:41 ` [igt-dev] ✗ Fi.CI.IGT: failure for series starting with [i-g-t,1/8] " Patchwork
2019-09-03 12:46 ` Arkadiusz Hiler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190903083753.31540-1-arkadiusz.hiler@intel.com \
--to=arkadiusz.hiler@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox