Use ADD (docs)
The ADD command can accept as a <src> parameter:
- A folder within the build folder (the same folder as your Dockerfile). You would then add a line in your Dockerfile like this:
ADD folder /path/inside/your/container
or
- A single-file archive anywhere in your host filesystem.
To create an archive use the command:
tar -cvzf newArchive.tar.gz /path/to/your/folder
You would then add a line to your Dockerfile like this:
ADD /path/to/archive/newArchive.tar.gz /path/inside/your/container
Notes:
ADDwill automatically extract your archive.- presence/absence of trailing slashes is important, see the linked docs