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

change sources.list before trying to install anything

* if $dist is archived will fail

(cherry picked from commit b5c84e9f5685308d9c807e467166e8f26785fa19)
Victor Seva 8 жил өмнө
parent
commit
4fd307fafa

+ 2 - 2
create_dockerfile.sh

@@ -17,8 +17,6 @@ MAINTAINER Victor Seva <[email protected]>
 # old cached versions when the Dockerfile is built.
 # old cached versions when the Dockerfile is built.
 ENV REFRESHED_AT ${DATE}
 ENV REFRESHED_AT ${DATE}
 
 
-RUN rm -rf /var/lib/apt/lists/* && apt-get update && \
-  apt-get install --assume-yes gnupg wget
 EOF
 EOF
 
 
 if [ -n "${archived}" ] ; then
 if [ -n "${archived}" ] ; then
@@ -35,6 +33,8 @@ cat >>"${DOCKERFILE}" <<EOF
 # avoid httpredir errors
 # avoid httpredir errors
 RUN sed -i 's/httpredir/deb/g' /etc/apt/sources.list
 RUN sed -i 's/httpredir/deb/g' /etc/apt/sources.list
 
 
+RUN rm -rf /var/lib/apt/lists/* && apt-get update && \
+  apt-get install --assume-yes gnupg wget
 EOF
 EOF
 fi
 fi
 cat >>"${DOCKERFILE}" <<EOF
 cat >>"${DOCKERFILE}" <<EOF