What is Dockerfile and why is it used for ?

735    Asked by NicolaYoung in Devops , Asked on Nov 5, 2019
Answered by Nicola Young

 Docker file is a text file used to create a running container without executing or typing commands again and again.

Docker file is executed using docker build command.

Environment variables used in Docker file are-

FROM, RUN/CMD, ADD, ENV, COPY, LABEL, VOLUME, USER, WORKDAY, EXPOSE,STOP SIGNAL

To run a docker file use below command

docker build . (If the file name is docker file)

else, if file is other than docker file

docker build



Your Answer

Interviews

Parent Categories