Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»General Articles»How to Add a Comments in Dockerfile

    How to Add a Comments in Dockerfile

    By RahulMay 14, 20201 Min Read

    Comments are the important parts of any programming language. Which is used to describe details about the application. In this tutorial you will learn about using comments in Dockerfile.

    Advertisement

    The Docker treats each line as comment begin with hash (#) sign, unless the line is a valid directive. The # marker must be the first character of of line be make it comments, anywhere else in a line is treated as an argument. The commends can use used as:

    # This is a comment line
    RUN echo 'Welcome to tecadmin.net'
    

    In the above example # is placed at the beginning of the line. Any where the # symbol in line is used as an arguments.

    Add comment in dockerfile

    The Dockerfile also uses a parser directive which is written on first line of the file and begin with a # symbol. That line is also not count as comment.

    comments Docker Dockerfile
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    How to Split Large Archives in Linux using the Command Line

    System.out.println() Method in Java: A Beginner’s Guide

    sleep Command in Linux with Examples

    Add A Comment

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • How to Split Large Archives in Linux using the Command Line
    • System.out.println() Method in Java: A Beginner’s Guide
    • Split Command in Linux With Examples (Split Large Files)
    • Test Your Internet Speed from the Linux Terminal
    • 11 Practical Example of cat Command in Linux
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.