You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #5240, where I made a mistake in my HEREDOC syntax. Just jotting it down here; not sure what the best output would look like, but I think the combination of errors, warnings, hints being intertwined can be confusing.
Looking back at that ticket, I also realize now that the expanded ("per line") output is not related to the linting, but to the error. I recall I initially used the wrong delimited (used EOF for both the Dockerfile and the RUN heredoc); the combination of a warning and error quickly gets confusing as they're all interleaved;
In this case
error (RUN failed)
X warnings found
summary of warning(s)
details about error
error (again)
hint (view build details)
docker build --progress=plain --no-cache -<<'EOF'# syntax=docker/dockerfile:1FROM alpineRUN -<<'EOF'env foo=barEOF
EOF
# .....#9 [2/2] RUN -<<'EOF'#9 0.116 /bin/sh: illegal option -<#9 ERROR: process "/bin/sh -c -<<'EOF'" did not complete successfully: exit code: 2
------
> [2/2] RUN -<<'EOF':0.116 /bin/sh: illegal option -<------ 1 warning found (use docker --debug to expand): - ConsistentInstructionCasing: Command 'env' should match the case of the command majority (uppercase) (line 5)Dockerfile:4-------------------- 2 | 3 | FROM alpine 4 | >>> RUN -<<'EOF' 5 | env foo=bar 6 |--------------------ERROR: failed to solve: process "/bin/sh -c -<<'EOF'" did not complete successfully: exit code: 2View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/aiqna4u2fi004x8x3qriz463ibash: EOF: command not found
After "fixing" the EOF -> EOT mistake;
warnings found
summary of warnings
error-details
error
hint
docker build --progress=plain --no-cache -<<'EOF'# syntax=docker/dockerfile:1FROM alpineRUN -<<'EOT'env foo=barEOTEOF# .....#3 CACHED
1 warning found (use docker --debug to expand):
- ConsistentInstructionCasing: Command 'env' should match the case of the command majority (uppercase) (line 5)
Dockerfile:6
--------------------
4 | RUN -<<'EOT' 5 | env foo=bar 6 | >>> EOT 7 |--------------------ERROR: failed to solve: dockerfile parse error on line 6: unknown instruction: EOT (did you mean ENV?)View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/lcjyf5gzycy3bedca61xnnysz
Without heredoc (on Docker Desktop with scout plugin installed);
hint
warnings found
summary of warnings
scout hint
docker build --progress=plain --no-cache -<<'EOF'# syntax=docker/dockerfile:1FROM alpineRUN echo fooenv foo=barEOF#8 DONE 0.0s
View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/pdudz3dywoxrroyc77rekkztx
1 warning found (use docker --debug to expand):
- ConsistentInstructionCasing: Command 'env' should match the case of the command majority (uppercase) (line 5)
What's next: View a summary of image vulnerabilities and recommendations → docker scout quickview
The text was updated successfully, but these errors were encountered:
Related to #5240, where I made a mistake in my HEREDOC syntax. Just jotting it down here; not sure what the best output would look like, but I think the combination of errors, warnings, hints being intertwined can be confusing.
Looking back at that ticket, I also realize now that the expanded ("per line") output is not related to the linting, but to the error. I recall I initially used the wrong delimited (used
EOF
for both the Dockerfile and theRUN
heredoc); the combination of a warning and error quickly gets confusing as they're all interleaved;In this case
After "fixing" the
EOF -> EOT
mistake;Without heredoc (on Docker Desktop with scout plugin installed);
The text was updated successfully, but these errors were encountered: