[glib: 1/2] ci: Build Docker images rather than OCI images if using podman
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 1/2] ci: Build Docker images rather than OCI images if using podman
- Date: Mon, 16 Dec 2019 12:44:42 +0000 (UTC)
commit 4546b9abfe49a2715760684013ec77626a886eea
Author: Philip Withnall <withnall endlessm com>
Date: Wed Nov 27 14:55:48 2019 +0000
ci: Build Docker images rather than OCI images if using podman
The dockerd instance on some (but not all) GitLab CI runners doesn’t
like the OCI output from the version of podman on Fedora 31, which is
causing a lot of spurious CI failures.
If whoever’s running `run-docker.sh` is using podman to emulate docker,
it needs to be told to output in Docker format, not OCI format.
Signed-off-by: Philip Withnall <withnall endlessm com>
.gitlab-ci/run-docker.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/.gitlab-ci/run-docker.sh b/.gitlab-ci/run-docker.sh
index 2f2693bc7..10a9b4816 100755
--- a/.gitlab-ci/run-docker.sh
+++ b/.gitlab-ci/run-docker.sh
@@ -88,8 +88,18 @@ fi
TAG="registry.gitlab.gnome.org/gnome/glib/${base}:${base_version}"
if [ $build == 1 ]; then
+ if docker --help |& grep -q podman; then
+ # Docker is actually implemented by podman, and its OCI output
+ # is incompatible with some of the dockerd instances on GitLab
+ # CI runners.
+ format="--format docker"
+ else
+ format=""
+ fi
+
echo -e "\e[1;32mBUILDING\e[0m: ${base} as ${TAG}"
sudo docker build \
+ ${format} \
--build-arg HOST_USER_ID="$UID" \
--tag "${TAG}" \
--file "${base}.Dockerfile" .
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]