Skip to content

Dockerfile doesn't pass linting using hadolint #163

@csantanapr

Description

@csantanapr

We are working on creating Tekton Pipelines for the application.

One of the Tekton tasks link the Dockerfile using hadolint

Here are the findings in the task that should be fixed or ignore via comment in Dockerfile

Dockerfile:19 DL3004 error: Do not use sudo as it leads to unpredictable behavior. Use a tool like gosu to enforce root
Dockerfile:33 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
Dockerfile:33 DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check
Dockerfile:36 DL3045 warning: `COPY` to a relative destination without `WORKDIR` set.
Dockerfile:37 DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`
Dockerfile:39 DL3045 warning: `COPY` to a relative destination without `WORKDIR` set.
Dockerfile:44 SC1075 error: Use 'elif' instead of 'else if' (or put 'if' on new line if nesting).
Dockerfile:44 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
Dockerfile:56 DL3025 warning: Use arguments JSON notation for CMD and ENTRYPOINT arguments

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions