2
0
Эх сурвалжийг харах

fix repositories at images based on debian/eol

(cherry picked from commit 2e0639282368eee4a507d12aea8e536d03a2936c)
Victor Seva 1 жил өмнө
parent
commit
49a3bbf7b8

+ 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
 # of the base images and things like 'apt-get update' won't be using
 # old cached versions when the Dockerfile is built.
 # old cached versions when the Dockerfile is built.
 ENV REFRESHED_AT ${DATE}
 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 && \
 RUN rm -rf /var/lib/apt/lists/* && apt-get update && \
   DEBIAN_FRONTEND=noninteractive apt-get install -qq --assume-yes gnupg wget apt-transport-https
   DEBIAN_FRONTEND=noninteractive apt-get install -qq --assume-yes gnupg wget apt-transport-https
 # kamailio repo
 # kamailio repo