Skip to content

Commit

Permalink
Fix container build after Ubuntu 21.10 reached EoL
Browse files Browse the repository at this point in the history
Ubuntu archived short-term release 21.10 and moved it to the
old-releases.ubuntu.com site. We still have to use it because
older Docker versions are affected by moby/moby#42681

To fix the build switch apt sources to old-releases before installing
packages.

Change-Id: I0432cd0002b4e955399539a5b0ddaba21b4535cc
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/36309
Reviewed-by: Arnav Kansal <rnv@google.com>
Tested-by: Oleksandr Tymoshenko <ovt@google.com>
Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
  • Loading branch information
gonzoua committed Aug 24, 2022
1 parent 625641b commit cb1a565
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cmd/cos_kernel_devenv/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM ubuntu:21.10

RUN apt-get -y update && \
RUN sed -i 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list && \
sed -i 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list && \
apt-get -y update && \
apt-get -y install apt-transport-https ca-certificates gnupg curl && \
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" \
> /etc/apt/sources.list.d/google-cloud-sdk.list && \
Expand Down

0 comments on commit cb1a565

Please sign in to comment.