genuinetools/img

img fails to build images based on Ubuntu 22.04

betheev opened this issue · 0 comments

Hi,

apparently something changed in Ubuntu 22.04 so that img is no longer able to build images based on it. According to this SO question, this problem also affected Docker but it was fixed in newer versions.

The problem is very easy to reproduce. Simply try to build a Dockerfile with the following content:

FROM ubuntu:22.04
RUN apt-get update

The first of many similar errors is:

Err:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C
...
E: The repository 'http://security.ubuntu.com/ubuntu jammy-security InRelease' is not signed.
...
E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true'
E: Sub-process returned an error code

If Ubuntu:20.04 is used as base image, the image is built successfully.