Skip to content

Commit

Permalink
lint: DL3009 clean up a bit better after apt
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Schurz <[email protected]>
  • Loading branch information
schurzi committed Oct 17, 2023
1 parent f335e2b commit 3c7e80e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
9 changes: 6 additions & 3 deletions debian10-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
FROM debian:buster
LABEL maintainer="Sebastian Gumprich"

RUN apt-get update -y && apt-get install --fix-missing && \
RUN apt-get update -y && apt-get install -y --fix-missing && \

Check failure on line 4 in debian10-ansible-latest/Dockerfile

View workflow job for this annotation

GitHub Actions / docker

DL3015 info: Avoid additional packages by specifying `--no-install-recommends`
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python python-yaml sudo \
curl gcc python-pip python-dev libffi-dev libssl-dev systemd
RUN pip install --no-cache-dir --upgrade cffi && \
curl gcc python-pip python-dev libffi-dev libssl-dev systemd && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir --upgrade cffi && \
pip install --no-cache-dir ansible

RUN apt-get -f -y --auto-remove remove \
Expand Down
5 changes: 4 additions & 1 deletion debian11-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missin
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
python3 python3-yaml sudo \
curl gcc python3-pip python3-dev libffi-dev libssl-dev systemd
curl gcc python3-pip python3-dev libffi-dev libssl-dev systemd && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir --upgrade cffi && \
pip install --no-cache-dir ansible

Expand Down
4 changes: 3 additions & 1 deletion debian12-ansible-latest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missin
DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
python3 python3-yaml sudo \
curl gcc python3-pip python3-dev libffi-dev libssl-dev systemd
curl gcc python3-pip python3-dev libffi-dev libssl-dev systemd && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Allow installing stuff to system Python.
RUN rm -f /usr/lib/python3.11/EXTERNALLY-MANAGED
Expand Down

0 comments on commit 3c7e80e

Please sign in to comment.