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 page of the IDE settings Ctrl+Alt+S.
Inspection | Description | Default Severity |
---|---|---|
Invalid destination for ''ADD''/''COPY'' commands |
# all the commands below will fail
ADD textA.txt textB.txt relativeDir
ADD ["binaryA.jar", "binary2.jar", "destination"]
COPY text3.txt text4.txt /absolute/path
After the quick-fix is applied:
ADD textA.txt textB.txt relativeDir/
ADD ["binaryA.jar", "binary2.jar", "destination/"]
COPY text3.txt text4.txt /absolute/path/
| Warning |
Invalid spaces in ''key=value'' pair |
# all the commands below will fail
ARG answer = 42
ARG version= "1.0.0"
LABEL "maintained.by"= someone@gmail.com
ENV JAVA_HOME= "/docker-java-home"
After the quick-fix is applied:
ARG answer=2
ARG version="1.0.0"
LABEL "maintained.by"=someone@gmail.com
ENV JAVA_HOME="/docker-java-home"
| Error |
Wrong number of arguments |
| Error |