Copy file from stopped container
The command gets two parameters, the first one contains the name of the container and the path to the file inside the container we would like to copy. The second parameter is the name or location of the file outside the container. dot . just means, copy the file here with the same name as we had inside.
The cp command looks similar to the cp command of Linux.
docker container cp CONTAINER_NAME:FILE . docker container cp ubu:welcome.txt .
- On your host OS you can copy files from the container to the external filesystem.