How to copy files and folders to a working directory in Dockerfile? How to copy files and folders to a working directory in Dockerfile? express express

How to copy files and folders to a working directory in Dockerfile?


Solution

In order to copy files and folders to a working directory, you can use the following in your Dockerfile:

WORKDIR /working/directory/pathCOPY . .

This is an easy way to change to a working directory and copy everything from your host source.

Please Note

This will copy everything from the source path --more of a convenience when testing locally.