如何在Dockerfile中发表评论? [英] How do I make a comment in a Dockerfile?

查看:63
本文介绍了如何在Dockerfile中发表评论?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个Dockerfile。

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

Docker的注释选项是否接受其余行并忽略它?

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

推荐答案

您可以使用#作为该行的开头来注释该行

# Everything on this line is a comment




注意:作为注释只能是在该行的开始中使用。

Note: # as a comment can only be used at the beginning of the line.

这篇关于如何在Dockerfile中发表评论?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆