Code Inspections in Dockerfile
This topic lists all JetBrains Rider code inspections available in Dockerfile.
You can toggle specific inspections or change their severity level on the Editor | Inspection Settings | Inspection Severity | Other Languages settings page CtrlAlt0S.
Inspection | Description | Default Severity |
---|---|---|
A single quoted string in JSON array format | Reports a single quoted string in JSON array format. JSON array form, must use double-quotes (") around words not single-quotes ('). Otherwise, Docker build will fail. Examples:
After the quick-fix is applied:
| |
Invalid destination for ''ADD''/''COPY'' commands | Reports invalid destination directories in According to the Dockerfile specification, if multiple sources are specified, then the destination must be a directory, and it must end with a slash '/'. Otherwise, Docker build will fail. Examples:
After the quick-fix is applied:
| |
Invalid spaces in ''key=value'' pair | Reports incorrect spacing for key-value pairs in While it is not explicitly specified in the Dockerfile specification, some combinations of spacing for key-value pairs are not allowed. Docker build will fail after reaching the problem instruction. Examples:
After the quick-fix is applied:
| |
Missing continuation character for ''RUN'' command | Reports missing continuation characters in In the shell form of Examples:
After the quick-fix is applied:
| |
Wrong number of arguments | Reports invalid number of arguments for the Dockerfile commands. Docker build will fail after reaching the instruction with an invalid number of arguments. |