hadolint issues
Hi, Hadolint is a linter for Dockerfile. I just ran it on the images, feel free to update or ignore the raised issues:
$ docker run --rm -i hadolint/hadolint < dockerfile-vite
-:1 DL3006 warning: Always tag the version of an image explicitly
-:11 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
-:11 DL3004 error: Do not use sudo as it leads to unpredictable behavior. Use a tool like gosu to enforce root
-:23 DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
-:23 DL3015 info: Avoid additional packages by specifying `--no-install-recommends`
-:23 DL3009 info: Delete the apt-get lists after installing something
-:52 DL3047 info: Avoid use of wget without progress bar. Use `wget --progress=dot:giga <url>`. Or consider using `-q` or `-nv` (shorthands for `--quiet` or `--no-verbose`).
-:52 DL3003 warning: Use WORKDIR to switch to a directory
-:52 SC2086 info: Double quote to prevent globbing and word splitting.
-:64 DL3047 info: Avoid use of wget without progress bar. Use `wget --progress=dot:giga <url>`. Or consider using `-q` or `-nv` (shorthands for `--quiet` or `--no-verbose`).
-:64 SC2086 info: Double quote to prevent globbing and word splitting.
-:64 DL3003 warning: Use WORKDIR to switch to a directory
$ docker run --rm -i hadolint/hadolint < dockerfile-ci
-:9 DL3009 info: Delete the apt-get lists after installing something
-:10 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:71 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:72 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:73 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:75 DL3042 warning: Avoid use of cache directory with pip. Use `pip install --no-cache-dir <package>`
-:75 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:75 DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`
-:76 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:78 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
-:86 DL3003 warning: Use WORKDIR to switch to a directory
-:94 DL3003 warning: Use WORKDIR to switch to a directory
-:94 DL3047 info: Avoid use of wget without progress bar. Use `wget --progress=dot:giga <url>`. Or consider using `-q` or `-nv` (shorthands for `--quiet` or `--no-verbose`).
-:94 DL3004 error: Do not use sudo as it leads to unpredictable behavior. Use a tool like gosu to enforce root
-:102 DL3003 warning: Use WORKDIR to switch to a directory
-:102 DL3047 info: Avoid use of wget without progress bar. Use `wget --progress=dot:giga <url>`. Or consider using `-q` or `-nv` (shorthands for `--quiet` or `--no-verbose`).
-:106 SC2086 info: Double quote to prevent globbing and word splitting.
-:106 DL3047 info: Avoid use of wget without progress bar. Use `wget --progress=dot:giga <url>`. Or consider using `-q` or `-nv` (shorthands for `--quiet` or `--no-verbose`).
-:106 DL3003 warning: Use WORKDIR to switch to a directory
-:112 DL3003 warning: Use WORKDIR to switch to a directory
-:117 DL3047 info: Avoid use of wget without progress bar. Use `wget --progress=dot:giga <url>`. Or consider using `-q` or `-nv` (shorthands for `--quiet` or `--no-verbose`).
-:117 DL3003 warning: Use WORKDIR to switch to a directory
-:126 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
$ docker run --rm -i hadolint/hadolint < dockerfile-distrib
-:1 DL3006 warning: Always tag the version of an image explicitly
-:12 DL3009 info: Delete the apt-get lists after installing something
-:13 DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
-:13 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:13 DL3015 info: Avoid additional packages by specifying `--no-install-recommends`
-:43 DL3004 error: Do not use sudo as it leads to unpredictable behavior. Use a tool like gosu to enforce root
-:43 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
-:44 DL3004 error: Do not use sudo as it leads to unpredictable behavior. Use a tool like gosu to enforce root
-:44 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
-:45 DL3004 error: Do not use sudo as it leads to unpredictable behavior. Use a tool like gosu to enforce root
-:45 SC3037 warning: In POSIX sh, echo flags are undefined.
-:45 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
-:46 DL3009 info: Delete the apt-get lists after installing something
-:47 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:47 DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
-:47 DL3015 info: Avoid additional packages by specifying `--no-install-recommends`
-:49 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:49 DL3008 warning: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
-:49 DL3015 info: Avoid additional packages by specifying `--no-install-recommends`
-:51 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:52 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:53 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:55 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:56 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:57 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:58 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:72 SC2086 info: Double quote to prevent globbing and word splitting.
-:72 DL3003 warning: Use WORKDIR to switch to a directory
-:85 SC2086 info: Double quote to prevent globbing and word splitting.
-:85 DL3003 warning: Use WORKDIR to switch to a directory
-:108 SC2086 info: Double quote to prevent globbing and word splitting.
-:108 DL3003 warning: Use WORKDIR to switch to a directory
-:108 DL3047 info: Avoid use of wget without progress bar. Use `wget --progress=dot:giga <url>`. Or consider using `-q` or `-nv` (shorthands for `--quiet` or `--no-verbose`).
-:108 DL4001 warning: Either use Wget or Curl but not both
-:120 SC2086 info: Double quote to prevent globbing and word splitting.
-:120 DL4001 warning: Either use Wget or Curl but not both
-:120 DL3003 warning: Use WORKDIR to switch to a directory
-:120 DL3047 info: Avoid use of wget without progress bar. Use `wget --progress=dot:giga <url>`. Or consider using `-q` or `-nv` (shorthands for `--quiet` or `--no-verbose`).
-:124 SC2086 info: Double quote to prevent globbing and word splitting.
-:124 DL3003 warning: Use WORKDIR to switch to a directory
-:136 SC2086 info: Double quote to prevent globbing and word splitting.
-:136 DL3003 warning: Use WORKDIR to switch to a directory
-:149 SC2086 info: Double quote to prevent globbing and word splitting.
-:149 DL3003 warning: Use WORKDIR to switch to a directory
-:163 SC2086 info: Double quote to prevent globbing and word splitting.
-:163 DL3003 warning: Use WORKDIR to switch to a directory
-:172 SC2086 info: Double quote to prevent globbing and word splitting.
-:172 DL3003 warning: Use WORKDIR to switch to a directory
-:177 SC2086 info: Double quote to prevent globbing and word splitting.
-:177 DL3003 warning: Use WORKDIR to switch to a directory
-:188 SC2086 info: Double quote to prevent globbing and word splitting.
-:188 DL3003 warning: Use WORKDIR to switch to a directory
-:192 SC2086 info: Double quote to prevent globbing and word splitting.
-:192 DL3003 warning: Use WORKDIR to switch to a directory
-:208 SC2086 info: Double quote to prevent globbing and word splitting.
-:208 DL3003 warning: Use WORKDIR to switch to a directory
-:223 SC2086 info: Double quote to prevent globbing and word splitting.
-:223 DL3003 warning: Use WORKDIR to switch to a directory
-:238 SC2086 info: Double quote to prevent globbing and word splitting.
-:238 DL3003 warning: Use WORKDIR to switch to a directory
-:253 SC2086 info: Double quote to prevent globbing and word splitting.
-:253 DL3003 warning: Use WORKDIR to switch to a directory