From eaeaf30e86e45d63e314514ef0a68d7d5542cdd2 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 12 Jul 2018 17:12:26 -0700 Subject: [PATCH] Fix accidental dpkg-dev purging on non-slim variants --- 2.7/jessie/Dockerfile | 15 +++++++++------ 2.7/jessie/slim/Dockerfile | 19 +++++++++++++------ 2.7/stretch/Dockerfile | 15 +++++++++------ 2.7/stretch/slim/Dockerfile | 19 +++++++++++++------ 2.7/wheezy/Dockerfile | 15 +++++++++------ 3.4/jessie/Dockerfile | 15 +++++++++------ 3.4/jessie/slim/Dockerfile | 19 +++++++++++++------ 3.4/wheezy/Dockerfile | 15 +++++++++------ 3.5/jessie/Dockerfile | 15 +++++++++------ 3.5/jessie/slim/Dockerfile | 19 +++++++++++++------ 3.5/stretch/Dockerfile | 15 +++++++++------ 3.5/stretch/slim/Dockerfile | 19 +++++++++++++------ 3.6/jessie/Dockerfile | 15 +++++++++------ 3.6/jessie/slim/Dockerfile | 19 +++++++++++++------ 3.6/stretch/Dockerfile | 15 +++++++++------ 3.6/stretch/slim/Dockerfile | 19 +++++++++++++------ 3.7/stretch/Dockerfile | 15 +++++++++------ 3.7/stretch/slim/Dockerfile | 19 +++++++++++++------ Dockerfile-debian.template | 15 +++++++++------ Dockerfile-slim.template | 19 +++++++++++++------ update.sh | 10 +++++++++- 21 files changed, 225 insertions(+), 121 deletions(-) diff --git a/2.7/jessie/Dockerfile b/2.7/jessie/Dockerfile index cba37fec0..6c5df205d 100644 --- a/2.7/jessie/Dockerfile +++ b/2.7/jessie/Dockerfile @@ -19,12 +19,11 @@ ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF ENV PYTHON_VERSION 2.7.15 RUN set -ex \ - && buildDeps=' \ - dpkg-dev \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ tcl-dev \ tk-dev \ - ' \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -46,7 +45,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -54,7 +55,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python2 --version # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 10.0.1 diff --git a/2.7/jessie/slim/Dockerfile b/2.7/jessie/slim/Dockerfile index de77314c4..b3e13d4a7 100644 --- a/2.7/jessie/slim/Dockerfile +++ b/2.7/jessie/slim/Dockerfile @@ -23,7 +23,8 @@ ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF ENV PYTHON_VERSION 2.7.15 RUN set -ex \ - && buildDeps=" \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ dpkg-dev \ gcc \ libbz2-dev \ @@ -42,8 +43,7 @@ RUN set -ex \ zlib1g-dev \ # as of Stretch, "gpg" is no longer included by default $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ - " \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -65,7 +65,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -73,20 +75,25 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python2 --version # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 10.0.1 RUN set -ex; \ \ + savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ apt-get install -y --no-install-recommends wget; \ rm -rf /var/lib/apt/lists/*; \ \ wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ \ - apt-get purge -y --auto-remove wget; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ python get-pip.py \ --disable-pip-version-check \ diff --git a/2.7/stretch/Dockerfile b/2.7/stretch/Dockerfile index 2ec28a573..822c4cff5 100644 --- a/2.7/stretch/Dockerfile +++ b/2.7/stretch/Dockerfile @@ -19,12 +19,11 @@ ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF ENV PYTHON_VERSION 2.7.15 RUN set -ex \ - && buildDeps=' \ - dpkg-dev \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ tcl-dev \ tk-dev \ - ' \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -46,7 +45,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -54,7 +55,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python2 --version # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 10.0.1 diff --git a/2.7/stretch/slim/Dockerfile b/2.7/stretch/slim/Dockerfile index b20248bc2..22418131a 100644 --- a/2.7/stretch/slim/Dockerfile +++ b/2.7/stretch/slim/Dockerfile @@ -23,7 +23,8 @@ ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF ENV PYTHON_VERSION 2.7.15 RUN set -ex \ - && buildDeps=" \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ dpkg-dev \ gcc \ libbz2-dev \ @@ -42,8 +43,7 @@ RUN set -ex \ zlib1g-dev \ # as of Stretch, "gpg" is no longer included by default $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ - " \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -65,7 +65,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -73,20 +75,25 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python2 --version # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 10.0.1 RUN set -ex; \ \ + savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ apt-get install -y --no-install-recommends wget; \ rm -rf /var/lib/apt/lists/*; \ \ wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ \ - apt-get purge -y --auto-remove wget; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ python get-pip.py \ --disable-pip-version-check \ diff --git a/2.7/wheezy/Dockerfile b/2.7/wheezy/Dockerfile index 07abc133a..c3dcaa10d 100644 --- a/2.7/wheezy/Dockerfile +++ b/2.7/wheezy/Dockerfile @@ -19,12 +19,11 @@ ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF ENV PYTHON_VERSION 2.7.15 RUN set -ex \ - && buildDeps=' \ - dpkg-dev \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ tcl-dev \ tk-dev \ - ' \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -46,7 +45,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -54,7 +55,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python2 --version # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 10.0.1 diff --git a/3.4/jessie/Dockerfile b/3.4/jessie/Dockerfile index aa94315d6..19ca197b9 100644 --- a/3.4/jessie/Dockerfile +++ b/3.4/jessie/Dockerfile @@ -23,12 +23,11 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.4.8 RUN set -ex \ - && buildDeps=' \ - dpkg-dev \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ tcl-dev \ tk-dev \ - ' \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -53,7 +52,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -61,7 +62,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ diff --git a/3.4/jessie/slim/Dockerfile b/3.4/jessie/slim/Dockerfile index bffdd9c17..9d93a8c52 100644 --- a/3.4/jessie/slim/Dockerfile +++ b/3.4/jessie/slim/Dockerfile @@ -29,7 +29,8 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.4.8 RUN set -ex \ - && buildDeps=" \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ dpkg-dev \ gcc \ libbz2-dev \ @@ -50,8 +51,7 @@ RUN set -ex \ zlib1g-dev \ # as of Stretch, "gpg" is no longer included by default $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ - " \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -76,7 +76,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -84,7 +86,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ @@ -98,13 +102,16 @@ ENV PYTHON_PIP_VERSION 10.0.1 RUN set -ex; \ \ + savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ apt-get install -y --no-install-recommends wget; \ rm -rf /var/lib/apt/lists/*; \ \ wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ \ - apt-get purge -y --auto-remove wget; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ python get-pip.py \ --disable-pip-version-check \ diff --git a/3.4/wheezy/Dockerfile b/3.4/wheezy/Dockerfile index 592f2e0d3..d21739337 100644 --- a/3.4/wheezy/Dockerfile +++ b/3.4/wheezy/Dockerfile @@ -23,12 +23,11 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.4.8 RUN set -ex \ - && buildDeps=' \ - dpkg-dev \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ tcl-dev \ tk-dev \ - ' \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -53,7 +52,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -61,7 +62,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ diff --git a/3.5/jessie/Dockerfile b/3.5/jessie/Dockerfile index 05ae79d9a..70136c96e 100644 --- a/3.5/jessie/Dockerfile +++ b/3.5/jessie/Dockerfile @@ -23,12 +23,11 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.5.5 RUN set -ex \ - && buildDeps=' \ - dpkg-dev \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ tcl-dev \ tk-dev \ - ' \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -53,7 +52,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -61,7 +62,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ diff --git a/3.5/jessie/slim/Dockerfile b/3.5/jessie/slim/Dockerfile index ad1b210ba..028c328c7 100644 --- a/3.5/jessie/slim/Dockerfile +++ b/3.5/jessie/slim/Dockerfile @@ -29,7 +29,8 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.5.5 RUN set -ex \ - && buildDeps=" \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ dpkg-dev \ gcc \ libbz2-dev \ @@ -50,8 +51,7 @@ RUN set -ex \ zlib1g-dev \ # as of Stretch, "gpg" is no longer included by default $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ - " \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -76,7 +76,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -84,7 +86,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ @@ -98,13 +102,16 @@ ENV PYTHON_PIP_VERSION 10.0.1 RUN set -ex; \ \ + savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ apt-get install -y --no-install-recommends wget; \ rm -rf /var/lib/apt/lists/*; \ \ wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ \ - apt-get purge -y --auto-remove wget; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ python get-pip.py \ --disable-pip-version-check \ diff --git a/3.5/stretch/Dockerfile b/3.5/stretch/Dockerfile index fa1404ab8..ef001282b 100644 --- a/3.5/stretch/Dockerfile +++ b/3.5/stretch/Dockerfile @@ -23,12 +23,11 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.5.5 RUN set -ex \ - && buildDeps=' \ - dpkg-dev \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ tcl-dev \ tk-dev \ - ' \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -53,7 +52,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -61,7 +62,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ diff --git a/3.5/stretch/slim/Dockerfile b/3.5/stretch/slim/Dockerfile index c087ab8f1..b24e530ea 100644 --- a/3.5/stretch/slim/Dockerfile +++ b/3.5/stretch/slim/Dockerfile @@ -29,7 +29,8 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.5.5 RUN set -ex \ - && buildDeps=" \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ dpkg-dev \ gcc \ libbz2-dev \ @@ -50,8 +51,7 @@ RUN set -ex \ zlib1g-dev \ # as of Stretch, "gpg" is no longer included by default $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ - " \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -76,7 +76,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -84,7 +86,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ @@ -98,13 +102,16 @@ ENV PYTHON_PIP_VERSION 10.0.1 RUN set -ex; \ \ + savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ apt-get install -y --no-install-recommends wget; \ rm -rf /var/lib/apt/lists/*; \ \ wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ \ - apt-get purge -y --auto-remove wget; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ python get-pip.py \ --disable-pip-version-check \ diff --git a/3.6/jessie/Dockerfile b/3.6/jessie/Dockerfile index 77ef86fe4..460a9a226 100644 --- a/3.6/jessie/Dockerfile +++ b/3.6/jessie/Dockerfile @@ -23,12 +23,11 @@ ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D ENV PYTHON_VERSION 3.6.6 RUN set -ex \ - && buildDeps=' \ - dpkg-dev \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ tcl-dev \ tk-dev \ - ' \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -53,7 +52,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -61,7 +62,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ diff --git a/3.6/jessie/slim/Dockerfile b/3.6/jessie/slim/Dockerfile index 2fbed4e69..1ade0e5a4 100644 --- a/3.6/jessie/slim/Dockerfile +++ b/3.6/jessie/slim/Dockerfile @@ -29,7 +29,8 @@ ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D ENV PYTHON_VERSION 3.6.6 RUN set -ex \ - && buildDeps=" \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ dpkg-dev \ gcc \ libbz2-dev \ @@ -50,8 +51,7 @@ RUN set -ex \ zlib1g-dev \ # as of Stretch, "gpg" is no longer included by default $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ - " \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -76,7 +76,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -84,7 +86,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ @@ -98,13 +102,16 @@ ENV PYTHON_PIP_VERSION 10.0.1 RUN set -ex; \ \ + savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ apt-get install -y --no-install-recommends wget; \ rm -rf /var/lib/apt/lists/*; \ \ wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ \ - apt-get purge -y --auto-remove wget; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ python get-pip.py \ --disable-pip-version-check \ diff --git a/3.6/stretch/Dockerfile b/3.6/stretch/Dockerfile index c62a53ee5..902f7677d 100644 --- a/3.6/stretch/Dockerfile +++ b/3.6/stretch/Dockerfile @@ -23,12 +23,11 @@ ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D ENV PYTHON_VERSION 3.6.6 RUN set -ex \ - && buildDeps=' \ - dpkg-dev \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ tcl-dev \ tk-dev \ - ' \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -53,7 +52,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -61,7 +62,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ diff --git a/3.6/stretch/slim/Dockerfile b/3.6/stretch/slim/Dockerfile index a89256484..4128b5079 100644 --- a/3.6/stretch/slim/Dockerfile +++ b/3.6/stretch/slim/Dockerfile @@ -29,7 +29,8 @@ ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D ENV PYTHON_VERSION 3.6.6 RUN set -ex \ - && buildDeps=" \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ dpkg-dev \ gcc \ libbz2-dev \ @@ -50,8 +51,7 @@ RUN set -ex \ zlib1g-dev \ # as of Stretch, "gpg" is no longer included by default $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ - " \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -76,7 +76,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -84,7 +86,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ @@ -98,13 +102,16 @@ ENV PYTHON_PIP_VERSION 10.0.1 RUN set -ex; \ \ + savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ apt-get install -y --no-install-recommends wget; \ rm -rf /var/lib/apt/lists/*; \ \ wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ \ - apt-get purge -y --auto-remove wget; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ python get-pip.py \ --disable-pip-version-check \ diff --git a/3.7/stretch/Dockerfile b/3.7/stretch/Dockerfile index 773a0435c..fa5173ea7 100644 --- a/3.7/stretch/Dockerfile +++ b/3.7/stretch/Dockerfile @@ -23,12 +23,11 @@ ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D ENV PYTHON_VERSION 3.7.0 RUN set -ex \ - && buildDeps=' \ - dpkg-dev \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ tcl-dev \ tk-dev \ - ' \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -53,7 +52,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -61,7 +62,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ diff --git a/3.7/stretch/slim/Dockerfile b/3.7/stretch/slim/Dockerfile index 00465dbae..5fe97aaf2 100644 --- a/3.7/stretch/slim/Dockerfile +++ b/3.7/stretch/slim/Dockerfile @@ -29,7 +29,8 @@ ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D ENV PYTHON_VERSION 3.7.0 RUN set -ex \ - && buildDeps=" \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ dpkg-dev \ gcc \ libbz2-dev \ @@ -50,8 +51,7 @@ RUN set -ex \ zlib1g-dev \ # as of Stretch, "gpg" is no longer included by default $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ - " \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -76,7 +76,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -84,7 +86,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ @@ -98,13 +102,16 @@ ENV PYTHON_PIP_VERSION 10.0.1 RUN set -ex; \ \ + savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ apt-get install -y --no-install-recommends wget; \ rm -rf /var/lib/apt/lists/*; \ \ wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ \ - apt-get purge -y --auto-remove wget; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ python get-pip.py \ --disable-pip-version-check \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 6799174e5..d747aebe0 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -17,12 +17,11 @@ ENV GPG_KEY %%PLACEHOLDER%% ENV PYTHON_VERSION %%PLACEHOLDER%% RUN set -ex \ - && buildDeps=' \ - dpkg-dev \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ tcl-dev \ tk-dev \ - ' \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -47,7 +46,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -55,7 +56,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template index e005fe76d..7f35972a3 100644 --- a/Dockerfile-slim.template +++ b/Dockerfile-slim.template @@ -23,7 +23,8 @@ ENV GPG_KEY %%PLACEHOLDER%% ENV PYTHON_VERSION %%PLACEHOLDER%% RUN set -ex \ - && buildDeps=" \ + && savedAptMark="$(apt-mark showmanual)" \ + && apt-get update && apt-get install -y --no-install-recommends \ dpkg-dev \ gcc \ libbz2-dev \ @@ -44,8 +45,7 @@ RUN set -ex \ zlib1g-dev \ # as of Stretch, "gpg" is no longer included by default $(command -v gpg > /dev/null || echo 'gnupg dirmngr') \ - " \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && rm -rf /var/lib/apt/lists/* \ \ && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ @@ -70,7 +70,9 @@ RUN set -ex \ && make install \ && ldconfig \ \ - && apt-get purge -y --auto-remove $buildDeps \ + && apt-mark auto '.*' > /dev/null \ + && apt-mark manual $savedAptMark \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ \ && find /usr/local -depth \ \( \ @@ -78,7 +80,9 @@ RUN set -ex \ -o \ \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ \) -exec rm -rf '{}' + \ - && rm -rf /usr/src/python + && rm -rf /usr/src/python \ + \ + && python3 --version # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ @@ -92,13 +96,16 @@ ENV PYTHON_PIP_VERSION %%PLACEHOLDER%% RUN set -ex; \ \ + savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ apt-get install -y --no-install-recommends wget; \ rm -rf /var/lib/apt/lists/*; \ \ wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ \ - apt-get purge -y --auto-remove wget; \ + apt-mark auto '.*' > /dev/null; \ + [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \ + apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ \ python get-pip.py \ --disable-pip-version-check \ diff --git a/update.sh b/update.sh index 9aac170aa..3e76d862f 100755 --- a/update.sh +++ b/update.sh @@ -135,7 +135,15 @@ for version in "${versions[@]}"; do template="Dockerfile-${template}.template" if [[ "$version" == 2.* ]]; then - echo " TODO: vimdiff 3.6/$v/Dockerfile $version/$v/Dockerfile" + fail=1 + for newVersion in "${versions[@]}"; do + [[ "$newVersion" == 3.* ]] || continue + [ -f "$newVersion/$v/Dockerfile" ] || continue + echo " TODO: vimdiff $newVersion/$v/Dockerfile $version/$v/Dockerfile" + fail= + break + done + [ -z "$fail" ] || { echo >&2 "error: cannot find a suitable version for 'vimdiff' on '$version/$v/Dockerfile'"; exit 1; } else { generated_warning; cat "$template"; } > "$dir/Dockerfile" fi