Skip to content

Commit

Permalink
fix ubuntu archived distributions [skip ci]
Browse files Browse the repository at this point in the history
(cherry picked from commit eb589b4)
  • Loading branch information
linuxmaniac committed Jul 3, 2024
1 parent 989575d commit 5ba14d2
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions create_dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ LABEL org.opencontainers.image.authors Victor Seva <linuxmaniac@torreviejawirele
ENV REFRESHED_AT ${DATE}
EOF

if [[ "${docker_tag}" =~ "debian/eol" ]] ; then
if ${archived} ; then
cat >>"${DOCKERFILE}" <<EOF
# fix repositories
RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' -e '/${dist}-updates/d' /etc/apt/sources.list
${RULE}
EOF
fi

Expand Down Expand Up @@ -108,6 +108,18 @@ case ${dist} in
*) apt_key=true
esac

archived=false
case ${dist} in
precise)
archived=true ; MIRROR=old-release.ubuntu.com
RULE="RUN sed -i -e 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list"
;;
squeeze|wheezy|jessie|stretch)
archived=true ; MIRROR=archive.debian.org
RULE="RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' -e '/security.debian.org/d' -e '/${dist}-updates/d' /etc/apt/sources.list"
;;
esac

KAM_REPO=$(get_kam_repo)
PKGS=$(kam_packages)
[ -n "${PKGS}" ] || exit 1
Expand Down

0 comments on commit 5ba14d2

Please sign in to comment.