Docker RUN apt-get update returned a non-zero code:132

795 Views Asked by At

Below is docker build -t test:test . log

Sending build context to Docker daemon  1.225MB
Step 1/3 : FROM ppc64le/ubuntu:jammy
 ---> b4cdd8bc1823
Step 2/3 : ARG DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> 0d6079ed0b29
Step 3/3 : RUN apt-get update
 ---> Running in fca7ae125244
The command '/bin/sh -c apt-get update' returned a non-zero code: 132

It is clear to me that apt-get update is causing a problem but I don't know how to solve it. I googled everywhere but doesn't seem that peopple are getting this error code. Is it something related with ppc64le related? Any clues?

1

There are 1 best solutions below

0
On

Per man bash:

"When a command terminates on a fatal signal N, bash uses the value of 128+N as the exit status"

So a 132 code indicates signal 4. which per kill -l

$ kill -l
 1) SIGHUP   2) SIGINT   3) SIGQUIT  4) SIGILL   5) SIGTRAP

is SIGILL, illegal instruction. So either you aren't running on a POWER9+ ppc64le machine, or your qemu setup isn't emulating it.

Power8 machines can fail on SIGILL as apt-get can get compiled with POWER9 instructions (as I found out in docker library issue #12726). Note 22.04 jammy is POWER 9/10+ per release, and build.