choose dir where to run dockerfile 1

choose dir where to run dockerfile

#Use WORKDIR for changing directory in docker container instead of using cd.
#Example
WORKDIR /home/directory

Here is what the above code is Doing:
1. We are using the FROM keyword to specify the base image.
2. We are using the RUN keyword to run a command.
3. We are using the WORKDIR keyword to change the working directory.
4. We are using the CMD keyword to run a command when the container launches.

Similar Posts