Skip to content

Commit 7e0d5e1

Browse files
committed
build: Fix check for ubuntu:21.10
The check for ubuntu:21.10 that changes the repo path doesn't work with podman. We need to cope with the fact that the $from includes the "docker.io/" prefix. Also to see the value of $from we need to reintroduce it after the actual FROM directive, see: https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact#understand-how-arg-and-from-interact
1 parent 83aad68 commit 7e0d5e1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

build/ubuntu/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
ARG from
22
FROM ${from}
3+
ARG from
34

45
COPY ubuntu/packages.sh /tmp/packages.sh
56

@@ -8,7 +9,7 @@ ENV apt_mirror=${apt_mirror}
89
RUN [ -n "$apt_mirror" ] && sed -i -e "s|ports.ubuntu.com|$apt_mirror|" /etc/apt/sources.list || true
910

1011
# Deal with Ubuntu 21.10 repos moving to old-releases (ppc64le only)
11-
RUN [ "$from" = "ubuntu:21.10" ] && sed -i -e "s|ports.ubuntu.com/ubuntu-ports|old-releases.ubuntu.com/ubuntu|" /etc/apt/sources.list || true
12+
RUN if echo "$from" | grep -q ".*ubuntu:21.10"; then sed -i -e "s|ports.ubuntu.com/ubuntu-ports|old-releases.ubuntu.com/ubuntu|" /etc/apt/sources.list; fi
1213

1314
RUN apt-get -q -y update && \
1415
DEBIAN_FRONTEND=noninteractive \

0 commit comments

Comments
 (0)