docker-library / drupal

Docker Official Image packaging for Drupal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support request: Building a multi-platform image using buildx FROM drupal:7 or drupal:9 (but not drupal:8) causes error processing package libc-bin

alberto56 opened this issue · comments

I am marking this as a support request, not a bug, because I believe that the official Drupal images are not at fault. However, because I can reproduce it on drupal:7 and drupal:9, but not drupal:8, perhaps the maintainers of the official Drupal images might have some insight on how to continue debugging this.

Background/context

I want to periodically create images based on drupal:7, drupal:8, and drupal:9 where I add a few tools that I need. These images need to be multi-platform (linux/arm64/v8, linux/amd64) so as to be used natively in Intel and Apple M1.

To do this I have my continuous integration system (1) create a new virtual machine on DigitalOcean with Docker preinstalled (2) I install docker buildx and QEMU using a project I created based on the article Building Multi-Architecture Docker Images With Buildx, Artur Klauser, Medium, Jan 18, 2020.

Everything works fine with drupal:8, but with drupal:7 and drupal:9, I get the error "dpkg: error processing package libc-bin".

To reproduce

I have distilled this to its simplest (for me), and here are the steps to reproduce it.

Step 1: create a virtual machine on DigitalOcean

DigitalOcean has a VM with Ubuntu with Docker preinstalled. That's the one I use, there is nothing special about it, but I want to be as specific as possible in my steps to reproduce because the issue is so weird.

Screen Shot 2021-12-31 at 12 34 31 PM

This can be done at https://cloud.digitalocean.com/droplets/new. I gave my VM 8Gb/ 160Gb/ 5Tb to make sure I don't have resource issues.

Step 2: install Buildx and Qemu

I do this by running:

git clone https://github.com/dcycle/prepare-docker-buildx.git
cd prepare-docker-buildx/
export DOCKER_CLI_EXPERIMENTAL=enabled
./scripts/run.sh
docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx inspect --bootstrap

Step 3: create Dockerfiles

Dockerfile7

FROM drupal:7

RUN apt-get update -y && apt-get install -y mariadb-client

Dockerfile8

FROM drupal:8

RUN apt-get update -y && apt-get install -y mariadb-client

Dockerfile9

FROM drupal:9

RUN apt-get update -y && apt-get install -y mariadb-client

Step 4: Build images for the ARM platform (note that the Virtual Machine is on the AMD platform)

docker buildx build --progress plain -f="Dockerfile7" -t sandbox:7 --platform linux/arm64/v8 .
docker buildx build --progress plain -f="Dockerfile8" -t sandbox:8 --platform linux/arm64/v8 .
docker buildx build --progress plain -f="Dockerfile9" -t sandbox:9 --platform linux/arm64/v8 .

You will notice that creating the Dockerfile8 image works fine, but the other two cause the error:

#5 40.30 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#5 40.48 Segmentation fault (core dumped)
#5 40.48 dpkg: error processing package libc-bin (--configure):

For sake of completeness, here is the complete output of building Dockerfile8:

#1 [internal] load build definition from Dockerfile8
#1 sha256:2d5c206ea07acfa000c32747509c8765ed88bba7744c496b2ffd4f41888a1396
#1 transferring dockerfile: 113B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 sha256:257c1683f70cc87874eed7234b0679e16124e72105caf1596f5c000cf87a0165
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/library/drupal:8
#3 sha256:fe7b81145bedec03e3636719d64bcc0f90ae5e4a1f12f5d79cf394f138f0b8e5
#3 DONE 0.1s

#4 [1/2] FROM docker.io/library/drupal:8@sha256:8a1a3ee838993a7c7083a5999f67dc89406efa303c953ee6e286fcaa0023113f
#4 sha256:f185185a68200b8040f7942a8b0a8664f77bb6da5afffb7a98181e552cef6cae
#4 resolve docker.io/library/drupal:8@sha256:8a1a3ee838993a7c7083a5999f67dc89406efa303c953ee6e286fcaa0023113f done
#4 CACHED

#5 [2/2] RUN apt-get update -y && apt-get install -y mariadb-client
#5 sha256:9a25e8a90f447be42304c320f5d8e4937bb7dd020f70ba3bf732c2372adf569b
#5 0.584 Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
#5 0.587 Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
#5 0.689 Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
#5 2.976 Get:4 http://security.debian.org/debian-security buster/updates/main arm64 Packages [308 kB]
#5 5.417 Get:5 http://deb.debian.org/debian buster/main arm64 Packages [7735 kB]
#5 7.723 Get:6 http://deb.debian.org/debian buster-updates/main arm64 Packages [14.5 kB]
#5 8.932 Fetched 8297 kB in 8s (995 kB/s)
#5 8.932 Reading package lists...
#5 14.03 Reading package lists...
#5 19.23 Building dependency tree...
#5 20.35 Reading state information...
#5 21.18 The following additional packages will be installed:
#5 21.18   libaio1 libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libmariadb3
#5 21.18   libreadline5 libsnappy1v5 libterm-readkey-perl mariadb-client-10.3
#5 21.18   mariadb-client-core-10.3 mariadb-common mysql-common
#5 21.19 Suggested packages:
#5 21.19   libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl
#5 21.96 The following NEW packages will be installed:
#5 21.96   libaio1 libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libmariadb3
#5 21.96   libreadline5 libsnappy1v5 libterm-readkey-perl mariadb-client
#5 21.96   mariadb-client-10.3 mariadb-client-core-10.3 mariadb-common mysql-common
#5 22.14 0 upgraded, 13 newly installed, 0 to remove and 1 not upgraded.
#5 22.14 Need to get 7862 kB of archives.
#5 22.14 After this operation, 54.9 MB of additional disk space will be used.
#5 22.14 Get:1 http://deb.debian.org/debian buster/main arm64 libaio1 arm64 0.3.112-3 [11.1 kB]
#5 22.15 Get:2 http://deb.debian.org/debian buster/main arm64 libconfig-inifiles-perl all 3.000001-1 [51.9 kB]
#5 22.16 Get:3 http://deb.debian.org/debian buster/main arm64 libdbi-perl arm64 1.642-1+deb10u2 [770 kB]
#5 22.18 Get:4 http://deb.debian.org/debian buster/main arm64 mysql-common all 5.8+1.0.5 [7324 B]
#5 22.18 Get:5 http://deb.debian.org/debian buster/main arm64 mariadb-common all 1:10.3.31-0+deb10u1 [32.7 kB]
#5 22.19 Get:6 http://deb.debian.org/debian buster/main arm64 libmariadb3 arm64 1:10.3.31-0+deb10u1 [162 kB]
#5 22.19 Get:7 http://deb.debian.org/debian buster/main arm64 libdbd-mysql-perl arm64 4.050-2 [117 kB]
#5 22.20 Get:8 http://deb.debian.org/debian buster/main arm64 libreadline5 arm64 5.2+dfsg-3+b13 [113 kB]
#5 22.20 Get:9 http://deb.debian.org/debian buster/main arm64 libsnappy1v5 arm64 1.1.7-1 [16.8 kB]
#5 22.20 Get:10 http://deb.debian.org/debian buster/main arm64 libterm-readkey-perl arm64 2.38-1 [27.0 kB]
#5 22.20 Get:11 http://deb.debian.org/debian buster/main arm64 mariadb-client-core-10.3 arm64 1:10.3.31-0+deb10u1 [5388 kB]
#5 22.33 Get:12 http://deb.debian.org/debian buster/main arm64 mariadb-client-10.3 arm64 1:10.3.31-0+deb10u1 [1133 kB]
#5 22.36 Get:13 http://deb.debian.org/debian buster/main arm64 mariadb-client all 1:10.3.31-0+deb10u1 [31.5 kB]
#5 23.40 debconf: delaying package configuration, since apt-utils is not installed
#5 23.56 Fetched 7862 kB in 0s (25.6 MB/s)
#5 23.77 Selecting previously unselected package libaio1:arm64.
(Reading database ... 13557 files and directories currently installed.)
#5 23.80 Preparing to unpack .../00-libaio1_0.3.112-3_arm64.deb ...
#5 23.81 Unpacking libaio1:arm64 (0.3.112-3) ...
#5 24.00 Selecting previously unselected package libconfig-inifiles-perl.
#5 24.01 Preparing to unpack .../01-libconfig-inifiles-perl_3.000001-1_all.deb ...
#5 24.01 Unpacking libconfig-inifiles-perl (3.000001-1) ...
#5 24.23 Selecting previously unselected package libdbi-perl:arm64.
#5 24.23 Preparing to unpack .../02-libdbi-perl_1.642-1+deb10u2_arm64.deb ...
#5 24.24 Unpacking libdbi-perl:arm64 (1.642-1+deb10u2) ...
#5 24.63 Selecting previously unselected package mysql-common.
#5 24.63 Preparing to unpack .../03-mysql-common_5.8+1.0.5_all.deb ...
#5 24.93 Unpacking mysql-common (5.8+1.0.5) ...
#5 25.16 Selecting previously unselected package mariadb-common.
#5 25.16 Preparing to unpack .../04-mariadb-common_1%3a10.3.31-0+deb10u1_all.deb ...
#5 25.25 Unpacking mariadb-common (1:10.3.31-0+deb10u1) ...
#5 25.50 Selecting previously unselected package libmariadb3:arm64.
#5 25.50 Preparing to unpack .../05-libmariadb3_1%3a10.3.31-0+deb10u1_arm64.deb ...
#5 25.51 Unpacking libmariadb3:arm64 (1:10.3.31-0+deb10u1) ...
#5 25.76 Selecting previously unselected package libdbd-mysql-perl:arm64.
#5 25.77 Preparing to unpack .../06-libdbd-mysql-perl_4.050-2_arm64.deb ...
#5 25.77 Unpacking libdbd-mysql-perl:arm64 (4.050-2) ...
#5 26.03 Selecting previously unselected package libreadline5:arm64.
#5 26.04 Preparing to unpack .../07-libreadline5_5.2+dfsg-3+b13_arm64.deb ...
#5 26.04 Unpacking libreadline5:arm64 (5.2+dfsg-3+b13) ...
#5 26.28 Selecting previously unselected package libsnappy1v5:arm64.
#5 26.28 Preparing to unpack .../08-libsnappy1v5_1.1.7-1_arm64.deb ...
#5 26.29 Unpacking libsnappy1v5:arm64 (1.1.7-1) ...
#5 26.49 Selecting previously unselected package libterm-readkey-perl.
#5 26.50 Preparing to unpack .../09-libterm-readkey-perl_2.38-1_arm64.deb ...
#5 26.50 Unpacking libterm-readkey-perl (2.38-1) ...
#5 26.72 Selecting previously unselected package mariadb-client-core-10.3.
#5 26.72 Preparing to unpack .../10-mariadb-client-core-10.3_1%3a10.3.31-0+deb10u1_arm64.deb ...
#5 26.73 Unpacking mariadb-client-core-10.3 (1:10.3.31-0+deb10u1) ...
#5 28.59 Selecting previously unselected package mariadb-client-10.3.
#5 28.59 Preparing to unpack .../11-mariadb-client-10.3_1%3a10.3.31-0+deb10u1_arm64.deb ...
#5 28.60 Unpacking mariadb-client-10.3 (1:10.3.31-0+deb10u1) ...
#5 29.26 Selecting previously unselected package mariadb-client.
#5 29.26 Preparing to unpack .../12-mariadb-client_1%3a10.3.31-0+deb10u1_all.deb ...
#5 29.27 Unpacking mariadb-client (1:10.3.31-0+deb10u1) ...
#5 29.52 Setting up libconfig-inifiles-perl (3.000001-1) ...
#5 29.53 Setting up mysql-common (5.8+1.0.5) ...
#5 29.84 update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
#5 29.86 Setting up libreadline5:arm64 (5.2+dfsg-3+b13) ...
#5 29.87 Setting up libsnappy1v5:arm64 (1.1.7-1) ...
#5 29.88 Setting up mariadb-common (1:10.3.31-0+deb10u1) ...
#5 29.98 update-alternatives: using /etc/mysql/mariadb.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
#5 29.99 Setting up libmariadb3:arm64 (1:10.3.31-0+deb10u1) ...
#5 30.00 Setting up libterm-readkey-perl (2.38-1) ...
#5 30.01 Setting up libaio1:arm64 (0.3.112-3) ...
#5 30.02 Setting up libdbi-perl:arm64 (1.642-1+deb10u2) ...
#5 30.02 Setting up libdbd-mysql-perl:arm64 (4.050-2) ...
#5 30.03 Setting up mariadb-client-core-10.3 (1:10.3.31-0+deb10u1) ...
#5 30.04 Setting up mariadb-client-10.3 (1:10.3.31-0+deb10u1) ...
#5 30.13 Setting up mariadb-client (1:10.3.31-0+deb10u1) ...
#5 30.14 Processing triggers for libc-bin (2.28-10) ...
#5 DONE 30.4s

And here is the output from trying to build Dockerfile9:

#1 [internal] load build definition from Dockerfile9
#1 sha256:b2340f52751062ed091015816162355682d84934600fc7ba8aaa9a3b01b926f5
#1 transferring dockerfile: 114B done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 sha256:c0bbd586fbe61d102c809bad5aba9c9836d637fe2c25839bf48843af77274f78
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [internal] load metadata for docker.io/library/drupal:9
#3 sha256:7e4d33b0013697dd015c33d5ed85674894ce501dec7b0c953aa0be26d0eb5c45
#3 DONE 0.4s

#4 [1/2] FROM docker.io/library/drupal:9@sha256:ac2a37ddaa0c479e16caf4625d2ca910f2f06abc380efac9b6eb217f9d2dc2a5
#4 sha256:eb87622277e9b9815deab1abec6cde1455bbc6dbbe606253d15dc68e5222ccfb
#4 resolve docker.io/library/drupal:9@sha256:ac2a37ddaa0c479e16caf4625d2ca910f2f06abc380efac9b6eb217f9d2dc2a5 done
#4 sha256:795796dd5086e11a830044a6ca31936caae7260b2b71b911f8608fd5aa14206f 113B / 113B 0.1s done
#4 sha256:4627a17efb9b6438621f0bbf92d0956a0965987686c9373a4d23cf3a108c9993 326B / 326B 0.1s done
#4 sha256:d8f7c7d650d024de217ff8c4b9519eec7ef35983bc2c23c204be0d5781e24216 573.48kB / 573.48kB 0.1s done
#4 sha256:081a64004e07bf9e89301772e755e8f8e5df9de9e7a3248132e4538ddc98b33b 4.19MB / 19.20MB 0.2s
#4 sha256:dcebcb7ffa0351087e9926a146e06d35db7c1d09ce8ac57a1cded2aa3091213e 895B / 895B 0.1s done
#4 sha256:f216f453dbe0ab935991ff890cd1cda630c60283b4eb277c39a308de42988943 247B / 247B 0.1s done
#4 sha256:081a64004e07bf9e89301772e755e8f8e5df9de9e7a3248132e4538ddc98b33b 16.26MB / 19.20MB 0.3s
#4 sha256:f01ee8f35e7a74433954d869d819a577f986ef71a68866c77bfad47f3e39b413 1.50MB / 1.50MB 0.1s done
#4 sha256:f617b9f995ea25e67e9d10cf9d51bd23a2808333925468e3ab480a202eb89be9 2.31kB / 2.31kB 0.1s done
#4 sha256:114c2c4962d547353cf7985bf32c3e8eccd5b34a80c539203ab3ec21857cdc2d 493B / 493B 0.1s done
#4 sha256:081a64004e07bf9e89301772e755e8f8e5df9de9e7a3248132e4538ddc98b33b 19.20MB / 19.20MB 0.3s done
#4 sha256:94f00e2bdc7b9a762157ac82ff97a8231635e62a06ff404516092d0508b1fd80 5.24MB / 13.94MB 0.2s
#4 sha256:4e2334d4e5309cb810075f604d9a588c6fcee2ea96d229c7869830f29acbf47c 10.98MB / 10.98MB 0.2s done
#4 sha256:94f00e2bdc7b9a762157ac82ff97a8231635e62a06ff404516092d0508b1fd80 13.94MB / 13.94MB 0.3s done
#4 extracting sha256:4e2334d4e5309cb810075f604d9a588c6fcee2ea96d229c7869830f29acbf47c 0.1s done
#4 DONE 0.5s

#4 [1/2] FROM docker.io/library/drupal:9@sha256:ac2a37ddaa0c479e16caf4625d2ca910f2f06abc380efac9b6eb217f9d2dc2a5
#4 sha256:eb87622277e9b9815deab1abec6cde1455bbc6dbbe606253d15dc68e5222ccfb
#4 extracting sha256:114c2c4962d547353cf7985bf32c3e8eccd5b34a80c539203ab3ec21857cdc2d done
#4 extracting sha256:94f00e2bdc7b9a762157ac82ff97a8231635e62a06ff404516092d0508b1fd80
#4 extracting sha256:94f00e2bdc7b9a762157ac82ff97a8231635e62a06ff404516092d0508b1fd80 0.6s done
#4 DONE 1.1s

#4 [1/2] FROM docker.io/library/drupal:9@sha256:ac2a37ddaa0c479e16caf4625d2ca910f2f06abc380efac9b6eb217f9d2dc2a5
#4 sha256:eb87622277e9b9815deab1abec6cde1455bbc6dbbe606253d15dc68e5222ccfb
#4 extracting sha256:f617b9f995ea25e67e9d10cf9d51bd23a2808333925468e3ab480a202eb89be9 done
#4 extracting sha256:f216f453dbe0ab935991ff890cd1cda630c60283b4eb277c39a308de42988943 0.0s done
#4 extracting sha256:dcebcb7ffa0351087e9926a146e06d35db7c1d09ce8ac57a1cded2aa3091213e done
#4 extracting sha256:f01ee8f35e7a74433954d869d819a577f986ef71a68866c77bfad47f3e39b413 0.1s done
#4 extracting sha256:4627a17efb9b6438621f0bbf92d0956a0965987686c9373a4d23cf3a108c9993 done
#4 extracting sha256:d8f7c7d650d024de217ff8c4b9519eec7ef35983bc2c23c204be0d5781e24216 0.0s done
#4 extracting sha256:795796dd5086e11a830044a6ca31936caae7260b2b71b911f8608fd5aa14206f
#4 extracting sha256:795796dd5086e11a830044a6ca31936caae7260b2b71b911f8608fd5aa14206f done
#4 extracting sha256:081a64004e07bf9e89301772e755e8f8e5df9de9e7a3248132e4538ddc98b33b
#4 extracting sha256:081a64004e07bf9e89301772e755e8f8e5df9de9e7a3248132e4538ddc98b33b 5.4s done
#4 DONE 6.6s

#5 [2/2] RUN apt-get update -y && apt-get install -y mariadb-client
#5 sha256:906c2d6656aeb1b546f10aa15f7d9e345f7f222433e80c514d74e56421c38739
#5 0.669 Get:1 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
#5 0.670 Get:2 http://deb.debian.org/debian bullseye InRelease [116 kB]
#5 0.812 Get:3 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
#5 3.134 Get:4 http://security.debian.org/debian-security bullseye-security/main arm64 Packages [100 kB]
#5 5.368 Get:5 http://deb.debian.org/debian bullseye/main arm64 Packages [8070 kB]
#5 7.699 Get:6 http://deb.debian.org/debian bullseye-updates/main arm64 Packages [2600 B]
#5 10.08 Fetched 8372 kB in 10s (875 kB/s)
#5 10.08 Reading package lists...
#5 15.22 Reading package lists...
#5 20.00 Building dependency tree...
#5 20.98 Reading state information...
#5 21.70 The following additional packages will be installed:
#5 21.70   libbsd0 libconfig-inifiles-perl libdbd-mariadb-perl libdbi-perl libedit2
#5 21.70   libmariadb3 libmd0 libterm-readkey-perl mariadb-client-10.5
#5 21.71   mariadb-client-core-10.5 mariadb-common mysql-common
#5 21.71 Suggested packages:
#5 21.71   libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl
#5 22.22 The following NEW packages will be installed:
#5 22.22   libbsd0 libconfig-inifiles-perl libdbd-mariadb-perl libdbi-perl libedit2
#5 22.22   libmariadb3 libmd0 libterm-readkey-perl mariadb-client mariadb-client-10.5
#5 22.22   mariadb-client-core-10.5 mariadb-common mysql-common
#5 22.43 0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
#5 22.43 Need to get 3665 kB of archives.
#5 22.43 After this operation, 39.7 MB of additional disk space will be used.
#5 22.43 Get:1 http://deb.debian.org/debian bullseye/main arm64 libmd0 arm64 1.0.3-3 [27.9 kB]
#5 22.44 Get:2 http://deb.debian.org/debian bullseye/main arm64 libbsd0 arm64 0.11.3-1 [106 kB]
#5 22.45 Get:3 http://deb.debian.org/debian bullseye/main arm64 libconfig-inifiles-perl all 3.000003-1 [52.1 kB]
#5 22.45 Get:4 http://deb.debian.org/debian bullseye/main arm64 libdbi-perl arm64 1.643-3+b1 [774 kB]
#5 22.50 Get:5 http://deb.debian.org/debian bullseye/main arm64 mysql-common all 5.8+1.0.7 [7464 B]
#5 22.50 Get:6 http://deb.debian.org/debian bullseye/main arm64 mariadb-common all 1:10.5.12-0+deb11u1 [36.3 kB]
#5 22.50 Get:7 http://deb.debian.org/debian bullseye/main arm64 libmariadb3 arm64 1:10.5.12-0+deb11u1 [166 kB]
#5 22.51 Get:8 http://deb.debian.org/debian bullseye/main arm64 libdbd-mariadb-perl arm64 1.21-3 [104 kB]
#5 22.51 Get:9 http://deb.debian.org/debian bullseye/main arm64 libedit2 arm64 3.1-20191231-2+b1 [92.1 kB]
#5 22.52 Get:10 http://deb.debian.org/debian bullseye/main arm64 libterm-readkey-perl arm64 2.38-1+b2 [27.3 kB]
#5 22.52 Get:11 http://deb.debian.org/debian bullseye/main arm64 mariadb-client-core-10.5 arm64 1:10.5.12-0+deb11u1 [755 kB]
#5 22.56 Get:12 http://deb.debian.org/debian bullseye/main arm64 mariadb-client-10.5 arm64 1:10.5.12-0+deb11u1 [1482 kB]
#5 22.62 Get:13 http://deb.debian.org/debian bullseye/main arm64 mariadb-client all 1:10.5.12-0+deb11u1 [34.8 kB]
#5 23.68 debconf: delaying package configuration, since apt-utils is not installed
#5 23.89 Fetched 3665 kB in 0s (10.1 MB/s)
#5 24.08 Selecting previously unselected package libmd0:arm64.
(Reading database ... 14111 files and directories currently installed.)
#5 24.11 Preparing to unpack .../00-libmd0_1.0.3-3_arm64.deb ...
#5 24.12 Unpacking libmd0:arm64 (1.0.3-3) ...
#5 24.35 Selecting previously unselected package libbsd0:arm64.
#5 24.35 Preparing to unpack .../01-libbsd0_0.11.3-1_arm64.deb ...
#5 24.36 Unpacking libbsd0:arm64 (0.11.3-1) ...
#5 24.59 Selecting previously unselected package libconfig-inifiles-perl.
#5 24.60 Preparing to unpack .../02-libconfig-inifiles-perl_3.000003-1_all.deb ...
#5 24.60 Unpacking libconfig-inifiles-perl (3.000003-1) ...
#5 24.82 Selecting previously unselected package libdbi-perl:arm64.
#5 24.83 Preparing to unpack .../03-libdbi-perl_1.643-3+b1_arm64.deb ...
#5 24.83 Unpacking libdbi-perl:arm64 (1.643-3+b1) ...
#5 25.21 Selecting previously unselected package mysql-common.
#5 25.21 Preparing to unpack .../04-mysql-common_5.8+1.0.7_all.deb ...
#5 25.49 Unpacking mysql-common (5.8+1.0.7) ...
#5 25.71 Selecting previously unselected package mariadb-common.
#5 25.71 Preparing to unpack .../05-mariadb-common_1%3a10.5.12-0+deb11u1_all.deb ...
#5 25.79 Unpacking mariadb-common (1:10.5.12-0+deb11u1) ...
#5 26.00 Selecting previously unselected package libmariadb3:arm64.
#5 26.00 Preparing to unpack .../06-libmariadb3_1%3a10.5.12-0+deb11u1_arm64.deb ...
#5 26.00 Unpacking libmariadb3:arm64 (1:10.5.12-0+deb11u1) ...
#5 26.26 Selecting previously unselected package libdbd-mariadb-perl.
#5 26.26 Preparing to unpack .../07-libdbd-mariadb-perl_1.21-3_arm64.deb ...
#5 26.27 Unpacking libdbd-mariadb-perl (1.21-3) ...
#5 26.49 Selecting previously unselected package libedit2:arm64.
#5 26.49 Preparing to unpack .../08-libedit2_3.1-20191231-2+b1_arm64.deb ...
#5 26.50 Unpacking libedit2:arm64 (3.1-20191231-2+b1) ...
#5 26.73 Selecting previously unselected package libterm-readkey-perl.
#5 26.73 Preparing to unpack .../09-libterm-readkey-perl_2.38-1+b2_arm64.deb ...
#5 26.74 Unpacking libterm-readkey-perl (2.38-1+b2) ...
#5 26.93 Selecting previously unselected package mariadb-client-core-10.5.
#5 26.94 Preparing to unpack .../10-mariadb-client-core-10.5_1%3a10.5.12-0+deb11u1_arm64.deb ...
#5 26.94 Unpacking mariadb-client-core-10.5 (1:10.5.12-0+deb11u1) ...
#5 27.43 Selecting previously unselected package mariadb-client-10.5.
#5 27.43 Preparing to unpack .../11-mariadb-client-10.5_1%3a10.5.12-0+deb11u1_arm64.deb ...
#5 27.44 Unpacking mariadb-client-10.5 (1:10.5.12-0+deb11u1) ...
#5 28.25 Selecting previously unselected package mariadb-client.
#5 28.25 Preparing to unpack .../12-mariadb-client_1%3a10.5.12-0+deb11u1_all.deb ...
#5 28.26 Unpacking mariadb-client (1:10.5.12-0+deb11u1) ...
#5 28.48 Setting up libconfig-inifiles-perl (3.000003-1) ...
#5 28.49 Setting up mysql-common (5.8+1.0.7) ...
#5 28.77 update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
#5 28.78 Setting up mariadb-common (1:10.5.12-0+deb11u1) ...
#5 28.89 update-alternatives: using /etc/mysql/mariadb.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
#5 28.95 Setting up libmariadb3:arm64 (1:10.5.12-0+deb11u1) ...
#5 28.96 Setting up libmd0:arm64 (1.0.3-3) ...
#5 28.97 Setting up libterm-readkey-perl (2.38-1+b2) ...
#5 28.98 Setting up libbsd0:arm64 (0.11.3-1) ...
#5 28.99 Setting up libdbi-perl:arm64 (1.643-3+b1) ...
#5 29.00 Setting up libedit2:arm64 (3.1-20191231-2+b1) ...
#5 29.00 Setting up libdbd-mariadb-perl (1.21-3) ...
#5 29.01 Setting up mariadb-client-core-10.5 (1:10.5.12-0+deb11u1) ...
#5 29.03 Setting up mariadb-client-10.5 (1:10.5.12-0+deb11u1) ...
#5 29.11 Setting up mariadb-client (1:10.5.12-0+deb11u1) ...
#5 29.12 Processing triggers for libc-bin (2.31-13+deb11u2) ...
#5 29.17 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#5 29.42 Segmentation fault (core dumped)
#5 29.44 qemu: uncaught target signal 11 (Segmentation fault) - core dumped
#5 29.68 Segmentation fault (core dumped)
#5 29.68 dpkg: error processing package libc-bin (--configure):
#5 29.68  installed libc-bin package post-installation script subprocess returned error exit status 139
#5 29.74 Errors were encountered while processing:
#5 29.74  libc-bin
#5 29.83 E: Sub-process /usr/bin/dpkg returned an error code (1)
#5 ERROR: process "/bin/sh -c apt-get update -y && apt-get install -y mariadb-client" did not complete successfully: exit code: 100
------
 > [2/2] RUN apt-get update -y && apt-get install -y mariadb-client:
------
Dockerfile9:3
--------------------
   1 |     FROM drupal:9
   2 |     
   3 | >>> RUN apt-get update -y && apt-get install -y mariadb-client
   4 |     
   5 |     
--------------------
error: failed to solve: rpc error: code = Unknown desc = process "/bin/sh -c apt-get update -y && apt-get install -y mariadb-client" did not complete successfully: exit code: 100

I found a workaround at https://forums.linuxmint.com/viewtopic.php?p=1871690 but this leads to more corruption (ldconfig disappearing from the system).

My question

Any guidance on how to continue debugging this would be highly appreciated. Specifically, anything that is different in tag 8 as opposed to tags 7 and 9.

I would suggest a dedicated support forum, such as the Docker Community Forums, the Docker Community Slack, or Stack Overflow.

My best guess would be something seccomp-related, so I'd suggest making sure you're on Docker 20.10.10 or newer with libseccomp 2.4.4 or newer.

Drupal 8.9 reached EOL and so is no longer updated: #200.
Drupal 7 and 9 were then updated to Debian Bullseye and Alpine 3.15 (#199), so @tianon's hunch is likely correct (since the seccomp issues only happen on images based on newer Debian and Alpine releases).

Thanks, highly appreciated.

Some more info on this:

I used DigitalOcean's "Docker" image at https://marketplace.digitalocean.com/apps/docker.

It is using:

  • Docker version 19.03.13
  • Ubuntu 18.04.5 LTS

I have reconfirmed that the issue occurs by running:

(git clone https://github.com/dcycle/prepare-docker-buildx.git
cd prepare-docker-buildx/
export DOCKER_CLI_EXPERIMENTAL=enabled
./scripts/run.sh
docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx inspect --bootstrap
cd ..
echo "FROM drupal:9" > Dockerfile
echo "RUN apt-get update -y && apt-get install -y mariadb-client" >> Dockerfile
docker buildx build -f="Dockerfile" -t sandbox:9 --platform linux/arm64/v8 .)

As expected, I got the error "error processing package libc-bin".

I then deleted the VM and create a new VM from the same DigitalOcean Docker image, and updated the version from 19 to 20 using instructions from the Docker website.

I did not have libseccomp installed to my knowledge so I did not install it.

I then tried once more to build the arm image; however the problem still occurred:

Error while loading /usr/sbin/dpkg-split: No such file or directory

I then reverted back to Docker 19 and tried with Alpine instead of Ubuntu, and this works:

(git clone https://github.com/dcycle/prepare-docker-buildx.git
cd prepare-docker-buildx/
export DOCKER_CLI_EXPERIMENTAL=enabled
./scripts/run.sh
docker buildx create --name mybuilder
docker buildx use mybuilder
docker buildx inspect --bootstrap
cd ..
echo "FROM drupal:9-fpm-alpine" > Dockerfile
echo "RUN apk add mariadb-client" >> Dockerfile
docker buildx build -f="Dockerfile" -t sandbox:9 --platform linux/arm/v6 .)

Another related issue is docker/buildx#495

Upon further testing this also works with the 9 tag, but the platform must be "linux/arm/v7"