Explorar o código

fix repositories at images based on debian/eol

(cherry picked from commit 2e0639282368eee4a507d12aea8e536d03a2936c)
Victor Seva hai 1 ano
pai
achega
49a3bbf7b8
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  1. 9 0
      create_dockerfile.sh

+ 9 - 0
create_dockerfile.sh

@@ -49,7 +49,16 @@ LABEL org.opencontainers.image.authors Victor Seva <linuxmaniac@torreviejawirele
 # of the base images and things like 'apt-get update' won't be using
 # old cached versions when the Dockerfile is built.
 ENV REFRESHED_AT ${DATE}
+EOF
+
+if [[ "${docker_tag}" =~ "debian/eol" ]] ; 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
+EOF
+fi
 
+  cat >>"${DOCKERFILE}" <<EOF
 RUN rm -rf /var/lib/apt/lists/* && apt-get update && \
   DEBIAN_FRONTEND=noninteractive apt-get install -qq --assume-yes gnupg wget apt-transport-https
 # kamailio repo