Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorific committed Nov 19, 2023
1 parent 0e25224 commit 2e8a9b6
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 10 deletions.
9 changes: 7 additions & 2 deletions python/3.10/slim-jammy/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ RUN set -eux; \
ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D
ENV PYTHON_VERSION 3.10.13

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3003,DL3047
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
Expand Down Expand Up @@ -106,7 +108,7 @@ RUN set -eux; \
ldconfig; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
apt-mark manual "$savedAptMark"; \
find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \
| sort -u \
Expand All @@ -121,6 +123,7 @@ RUN set -eux; \
python3 --version

# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN set -eux; \
for src in idle3 pydoc3 python3 python3-config; do \
dst="$(echo "$src" | tr -d 3)"; \
Expand All @@ -137,6 +140,8 @@ ENV PYTHON_SETUPTOOLS_VERSION 65.5.1
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/4cfa4081d27285bda1220a62a5ebf5b4bd749cdb/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 9cc01665956d22b3bf057ae8287b035827bfd895da235bcea200ab3b811790b6

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3047
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
Expand All @@ -147,7 +152,7 @@ RUN set -eux; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual "$savedAptMark" > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
Expand Down
9 changes: 7 additions & 2 deletions python/3.11/slim-jammy/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ RUN set -eux; \
ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D
ENV PYTHON_VERSION 3.11.6

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3003,DL3047
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
Expand Down Expand Up @@ -106,7 +108,7 @@ RUN set -eux; \
ldconfig; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
apt-mark manual "$savedAptMark"; \
find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \
| sort -u \
Expand All @@ -121,6 +123,7 @@ RUN set -eux; \
python3 --version

# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN set -eux; \
for src in idle3 pydoc3 python3 python3-config; do \
dst="$(echo "$src" | tr -d 3)"; \
Expand All @@ -137,6 +140,8 @@ ENV PYTHON_SETUPTOOLS_VERSION 65.5.1
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/4cfa4081d27285bda1220a62a5ebf5b4bd749cdb/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 9cc01665956d22b3bf057ae8287b035827bfd895da235bcea200ab3b811790b6

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3047
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
Expand All @@ -147,7 +152,7 @@ RUN set -eux; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual "$savedAptMark" > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
Expand Down
9 changes: 7 additions & 2 deletions python/3.12/slim-jammy/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ RUN set -eux; \
ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305
ENV PYTHON_VERSION 3.12.0

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3003,DL3047
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
Expand Down Expand Up @@ -106,7 +108,7 @@ RUN set -eux; \
ldconfig; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
apt-mark manual "$savedAptMark"; \
find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \
| sort -u \
Expand All @@ -121,6 +123,7 @@ RUN set -eux; \
python3 --version

# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN set -eux; \
for src in idle3 pydoc3 python3 python3-config; do \
dst="$(echo "$src" | tr -d 3)"; \
Expand All @@ -135,6 +138,8 @@ ENV PYTHON_PIP_VERSION 23.2.1
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/4cfa4081d27285bda1220a62a5ebf5b4bd749cdb/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 9cc01665956d22b3bf057ae8287b035827bfd895da235bcea200ab3b811790b6

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3047
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
Expand All @@ -145,7 +150,7 @@ RUN set -eux; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual "$savedAptMark" > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
Expand Down
9 changes: 7 additions & 2 deletions python/3.8/slim-jammy/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ RUN set -eux; \
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
ENV PYTHON_VERSION 3.8.18

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3003,DL3047
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
Expand Down Expand Up @@ -106,7 +108,7 @@ RUN set -eux; \
ldconfig; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
apt-mark manual "$savedAptMark"; \
find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \
| sort -u \
Expand All @@ -121,6 +123,7 @@ RUN set -eux; \
python3 --version

# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN set -eux; \
for src in idle3 pydoc3 python3 python3-config; do \
dst="$(echo "$src" | tr -d 3)"; \
Expand All @@ -137,6 +140,8 @@ ENV PYTHON_SETUPTOOLS_VERSION 57.5.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/4cfa4081d27285bda1220a62a5ebf5b4bd749cdb/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 9cc01665956d22b3bf057ae8287b035827bfd895da235bcea200ab3b811790b6

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3047
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
Expand All @@ -147,7 +152,7 @@ RUN set -eux; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual "$savedAptMark" > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
Expand Down
9 changes: 7 additions & 2 deletions python/3.9/slim-jammy/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ RUN set -eux; \
ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568
ENV PYTHON_VERSION 3.9.18

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3003,DL3047
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
Expand Down Expand Up @@ -105,7 +107,7 @@ RUN set -eux; \
ldconfig; \
\
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
apt-mark manual "$savedAptMark"; \
find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \
| sort -u \
Expand All @@ -120,6 +122,7 @@ RUN set -eux; \
python3 --version

# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends)
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN set -eux; \
for src in idle3 pydoc3 python3 python3-config; do \
dst="$(echo "$src" | tr -d 3)"; \
Expand All @@ -136,6 +139,8 @@ ENV PYTHON_SETUPTOOLS_VERSION 58.1.0
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/4cfa4081d27285bda1220a62a5ebf5b4bd749cdb/public/get-pip.py
ENV PYTHON_GET_PIP_SHA256 9cc01665956d22b3bf057ae8287b035827bfd895da235bcea200ab3b811790b6

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# hadolint ignore=DL3047
RUN set -eux; \
\
savedAptMark="$(apt-mark showmanual)"; \
Expand All @@ -146,7 +151,7 @@ RUN set -eux; \
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
\
apt-mark auto '.*' > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual "$savedAptMark" > /dev/null; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*; \
\
Expand Down

0 comments on commit 2e8a9b6

Please sign in to comment.