Skip to content

Commit

Permalink
apacheGH-40443: [Python] Suppress python/examples/minimal_build/Docke…
Browse files Browse the repository at this point in the history
…rfile.* warnings (apache#40444)

### Rationale for this change

    python/examples/minimal_build/Dockerfile.fedora:20 DL3040 warning: `dnf clean all` missing after dnf command.
    python/examples/minimal_build/Dockerfile.fedora:20 DL3041 warning: Specify version with `dnf install -y <package>-<version>`.
    python/examples/minimal_build/Dockerfile.fedora:32 DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`
    python/examples/minimal_build/Dockerfile.ubuntu:38 DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`

### What changes are included in this PR?

* Ignore "DL3041 warning: Specify version with `dnf install -y <package>-<version>`." because we don't specify version.
* Suppress other warnings.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: apache#40443

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
kou authored Mar 11, 2024
1 parent f299db0 commit bf07ce2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .hadolint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
ignored:
- DL3008
- DL3013
- DL3015 # Avoid additional packages by specifying `--no-install-recommends`
- DL3018
- DL3015 # Avoid additional packages by specifying `--no-install-recommends`
- DL3028 # Ruby gem version pinning
- DL3028 # Ruby gem version pinning
- DL3007 # r-sanitizer must use latest
- DL3041 # Specify version with `dnf install -y <package>-<version>`.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ repos:
name: Docker Format
language: docker_image
types:
- dockerfile
- dockerfile
entry: --entrypoint /bin/hadolint hadolint/hadolint:latest -
exclude: ^dev/.*$
- repo: https://github.com/pycqa/flake8
Expand Down
5 changes: 3 additions & 2 deletions python/examples/minimal_build/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ RUN dnf update -y && \
make \
cmake \
ninja-build \
python3-devel
python3-devel && \
dnf clean all

RUN pip3 install -U pip setuptools
RUN pip3 install --no-cache-dir -U pip setuptools
2 changes: 1 addition & 1 deletion python/examples/minimal_build/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ RUN apt-get update -y -q && \
&& \
apt-get clean && rm -rf /var/lib/apt/lists*

RUN pip3 install -U pip setuptools
RUN pip3 install --no-cache-dir -U pip setuptools

0 comments on commit bf07ce2

Please sign in to comment.