How to add a comment in a Dockerfile
I have created Dockerfile and I wanted to know that how to add dockerfile comments? Is there any way in docker which allows adding a comment option that takes the rest of a line and ignores it?
You can try using # and it will treat the whole line as a comment in your docker file.
For example:
# Everything on this line is a comment
Note: Format. Docker treats lines that begin with # as a comment unless the line is a valid parser directive. A # marker anywhere else in a line is treated as an argument.