Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Introduction to Docker!
You have completed Introduction to Docker!
Preview
The `WORKDIR` line specifies a new default directory within the image's file system. The COPY and ADD instructions allow you to copy files into your image's filesystem.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
If the directory doesn't exist,
it'll be created automatically.
0:00
Any RUN, COPY or ADD instructions that
follow the WORKDIR instruction in
0:01
the Docker file will be executed
within the specified directory.
0:05
We'll talk about COPY and ADD in moment.
0:09
When the container launches,
the command specified by ENTRYPOINT or
0:12
CMD will be run within
the specified WORKDIR directory.
0:16
We use it here in our Python web app
Docker file to create a /app directory to
0:21
house the app.
0:25
The COPY instructions that follow WORKDIR
will copy files into the /app directory.
0:27
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up