Docker Copy Files - Examples Java Code Geeks - 2022 2. Docker Copy file. Use the docker cp command to copy files/folders between a container and the local filesystem. 1. docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH|-. The docker cp utility copies the contents of SRC_PATH to the DEST_PATH. You can copy a file or a folder from a docker container to a local file system or vice-versa.