We have a couple of projects that uses our own docker images for testing packaging etc. The Dockerfile is checked in in the same repo and the first task of the pipeline is to build that image so that we can run the rest of the stuff inside containers of that image. This has been working for a while, but last week we noticed that the image didn't build anymore. It's failing on `apt-get update`
I put together a small example:
LOG:
<span>+ docker build --progress=plain -t lambdas.test:latest -f <a href="https://bitbucket.org/melioTech/imu-lambdas/src/ca65430c8b407fb69241c990a31b6c2b424ba92f/test.Dockerfile" rel="noopener noreferrer" target="_blank">./test.Dockerfile</a> .</span>
<span>Sending build context to Docker daemon 212.5kB</span>
<span>Step 1/2 : FROM ubuntu:22.04</span>
<span>22.04: Pulling from library/ubuntu</span>
<span>b9e826c39a51: Pulling fs layer</span>
<span>b9e826c39a51: Download complete</span>
<span>b9e826c39a51: Pull complete</span>
<span>Digest: sha256:9fd089c601e4ce6b61bfbba987b63ec6b73eb4ef9f568ad38b58cf0bbb019bff</span>
<span>Status: Downloaded newer image for ubuntu:22.04</span>
<span>---> 41ba606c8ab9</span>
<span>Step 2/2 : RUN apt-get update</span>
<span>---> Running in 6fd16c9342c4</span>
<span>Get:1 <a href="http://security.ubuntu.com/ubuntu" rel="noopener nofollow noreferrer" target="_blank">http://security.ubuntu.com/ubuntu</a> jammy-security InRelease [90.7 kB]</span>
<span>Get:2 <a href="http://archive.ubuntu.com/ubuntu" rel="noopener nofollow noreferrer" target="_blank">http://archive.ubuntu.com/ubuntu</a> jammy InRelease [270 kB]</span>
<span>Get:3 <a href="http://archive.ubuntu.com/ubuntu" rel="noopener nofollow noreferrer" target="_blank">http://archive.ubuntu.com/ubuntu</a> jammy-updates InRelease [90.7 kB]</span>
<span>Get:4 <a href="http://archive.ubuntu.com/ubuntu" rel="noopener nofollow noreferrer" target="_blank">http://archive.ubuntu.com/ubuntu</a> jammy-backports InRelease [90.7 kB]</span>
<span>Get:5 <a href="http://archive.ubuntu.com/ubuntu" rel="noopener nofollow noreferrer" target="_blank">http://archive.ubuntu.com/ubuntu</a> jammy/restricted amd64 Packages [135 kB]</span>
<span>Get:6 <a href="http://archive.ubuntu.com/ubuntu" rel="noopener nofollow noreferrer" target="_blank">http://archive.ubuntu.com/ubuntu</a> jammy/multiverse amd64 Packages [269 kB]</span>
<span>Get:7 <a href="http://archive.ubuntu.com/ubuntu" rel="noopener nofollow noreferrer" target="_blank">http://archive.ubuntu.com/ubuntu</a> jammy/universe amd64 Packages [17.5 MB]</span>
<span>Get:8 <a href="http://archive.ubuntu.com/ubuntu" rel="noopener nofollow noreferrer" target="_blank">http://archive.ubuntu.com/ubuntu</a> jammy/main amd64 Packages [1806 kB]</span>
<span>Fetched 20.2 MB in 3s (7601 kB/s)</span>
<span>Reading package lists...</span>
<span>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'</span>
<span>E: Sub-process returned an error code</span>
<span>The command '/bin/sh -c apt-get update' returned a non-zero code: 100</span>
<span>2022-03-07T06:03:10.88920723Z stdout P </span>
./test.Dockerfile:
FROM ubuntu:22.04
RUN apt-get update
Pipeline file:
image: ubuntu:22.04
pipelines:
default:
- step:
name: "build"
caches:
- docker
services:
- docker
script:
- docker build --progress=plain -t lambdas.test:latest -f ./test.Dockerfile .