How do I make a comment in a Dockerfile?

前端 未结 7 1076
悲&欢浪女
悲&欢浪女 2021-01-29 20:21

I am writing a Dockerfile. Is there a way to make comments in this file?

Does Docker have a comment option that takes the rest of a line and ignores it?

7条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-29 20:54

    # this is comment
    this isn't comment
    

    is the way to do it. You can place it anywhere in the line and anything that comes later will be ignored

提交回复
热议问题