How to add a comment in a Dockerfile?

0 votes

Hello guys, I have created Dockerfile and I wanted to know that how do I add comments in this file? I s there any way in docker which allows to add comment option that takes the rest of a line and ignores it?

Nov 13, 2018 in Docker by Shubham
• 980 points
451 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Here is what you have to do.

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
answered Nov 13, 2018 by Damon Salvatore
• 5,450 points

Related Questions In Docker

0 votes
1 answer
0 votes
1 answer

How to save a Dynamic port in Docker for Windows?

The mapped ports can be accessed via ...READ MORE

answered Sep 4, 2018 in Docker by Tyrion anex
• 8,280 points
31 views
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,140 points
80 views
+1 vote
1 answer

How to deploy a java app to Docker?

If you are having JAR file, the quickest ...READ MORE

answered Aug 2, 2018 in Docker by Damon Salvatore
• 5,450 points
24 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.