Docker the file transfer between the container and the native.

Source: Internet
Author: User
Tags docker cp

The name of the container must be used to transfer files between the host and the container.

Get the method as follows:

1. First get the short ID of the container or the specified name.

2. Then, according to either of these two items to get the full name of the ID.

With this long ID, the file transfer between the machine and the container is simple.

Docker CP local file path ID full name: container path

After entering the container, you can see the file that you just uploaded in.

If the container transmits files to the local, the reverse is good:

Docker CP ID full name: Container file path Local path

You can refer to this article by using volume in host and Docker container file transfer.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.