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
• 1,000 points
9,621 views

1 answer to this question.

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,980 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,700 points
932 views
0 votes
1 answer
+2 votes
1 answer
+2 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
• 58,020 points
2,820 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,980 points
1,089 views
0 votes
1 answer

Efficient way to run a Docker Compose stack in production?

Here is a concept which you can ...READ MORE

answered Aug 2, 2018 in Docker by Damon Salvatore
• 5,980 points
1,278 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP