Does Docker interactive mode run the command that are inside CMD inside DockerFile

0 votes

I cant find an answer about this !

If you want to enter the bash about Docker Container you use ;

1) docker run -it "Image" sh

There are some examples that when you enter the Interactive Node you type like this ;

docker run -it node 

 And after this you DONT enter to the bash ,you directly enter to the node console.
 I checked the DockerFile of node,and the CMD it says:

CMD [ "node" ]

So,i guess when you do docker run -it "Image" without nothing else,docker will execute the CMD command inside DockerFile.

    Please,let me know if i am wrong.

    Mar 11, 2021 in Docker by Al

    edited 4 days ago 10 views

    No answer to this question. Be the first to respond.

    Your answer

    Your name to display (optional):
    Privacy: Your email address will only be used for sending these notifications.
    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