Comment 13 for bug 1962225

Revision history for this message
Nic Doye (nic) wrote :

Place the following script in bin/uname (where bin and Dockerfile are in the same directory):

-8<----- uname
#!/bin/bash

# Until the following bug is fixed:
# https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1962225
# https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1962606

# Workaround from https://support.aqueos.net/index.php?/Knowledgebase/Article/View/your-kernel-version-indicates-a-revision-number-of-255-or-greater
#
if [[ "$1" == "-r" ]] ;then
    echo '4.9.250'
    exit
else
    uname.orig "$@"
fi
-8<-----

In your Dockerfile, you can do this. (You could just copy the uname script, but we have other things we copy in).

-8<----- From Dockerfile

COPY . /tmp/
RUN mv /bin/uname /bin/uname.orig \
    && install -m 0755 /tmp/bin/uname /bin \
    && apt-get update \
    && apt-get upgrade -y \
    ...
-8<-----