I tried to find many ways to transfer files to the docker container on the Internet, and found a bug in version 1.7
docker cp e0ce13a27784:/home/website/default /appuweichao/credit_ passport/web/
Error: Path not specified
The error message “error: path not specified” has been fixed in docker 1.8.0.
Error: path not specified
Solution: copy from the host to the container’s Mount directory
First, get the real ID of the container
docker inspect -f ‘{{.Id}}’ c37ca9beb746
cp /home/yulong/Downloads/file.txt /var/lib/docker/devicemapper/mnt/c37ca9beb7463630eddca6259bd26620cc60d413ae4869e1e0f96a21ad602155/rootfs/mnt
/var/lib/docker/devicemapper/mnt/c37ca9beb7463630eddca6259bd26620cc60d413ae4869e1e0f96a21ad602155/rootfs/mnt
This folder is actually a local shared folder where the container is mounted
Here are the folders for all the containers
c37ca9beb7463630eddca6259bd26620cc60d413ae4869e1e0f96a21ad602155
After entering the terminal/MNT, you can see it below file.txt It’s a document
Read More:
- The docker copies the win10 host file into the docker container. An error is reported: copying between containers is not supported
- Error running docker container: starting container process caused “exec: \“python\“: executable file
- Get connection timeout retry: 1 MySQL errorcode 0, state 08s01 docker container accessing MySQL container is very slow and sometimes interrupted
- An idea to solve Warning move_uploaded_file, failed to open stream in the process of php uploading files
- Docker CentOS Failed to get D-Bus connection: Operation not permitted
- When docker starts tomcat, the access port of the container displays 404, and the source server fails to find the representation of the target resource or is unwilling to disclose an existing one
- Docker start error: failed to start docker application container engine.
- move_uploaded_file() failed to open stream: Permission denied
- Installing opencv Python in docker container
- View the IP address of the docker container
- Vue introduction path is correct, but it always reports an error: already included file name‘ ××ב differs from file name ‘ ××ב only in casing.
- Docker creation container cannot find network card: error response from daemon: network XXXX not found
- [Sovled] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
- [extremely simple and effective] installing docker under centos6. X
- Solution of apt unable to update in the docker container of raspberry pie
- Error:java.io.FileNotFoundException: Path is not a file [How to Solve]
- zookeeper Failed to Startup: Error: JAVA_HOME is not set and java could not be found in PATH
- Java – read all the files and folders in a certain directory and three methods to get the file name from the file path
- Docker starts MySQL container and reports an error driver failed programming external connectivity on endpoint mysq
- When docker creates a container command: Error response from daemon: No command specified