MAX-Object-Detector
MAX-Object-Detector copied to clipboard
Dockerfile doesn't pass linting using hadolint
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
FYI: I am working with @csantanapr in this experiment
Maybe some of those warnings should be fixed?
For example:
Dockerfile:37 DL3042 warning: Avoid use of cache directory with pip. Use
pip install --no-cache-dir
Could you try again with the latest version?