"docker cp" all files from a folder to existing container folder

Chris G.

Am I missing something when I try to copy files from one folder to a existing container folder:

Doc

I want to copy files within the build(host) folder to html in my container:

docker cp ./src/build b081dbbb679b:/usr/share/nginx/html

To be clear; I need to copy from host to container.

But it copies the whole build folder and copies it to ..html/build

I just need the files(and sub folders) within the build folder to be copied into ..html.

Am I missing something or do I have to copy each file one by one?

BMW

Here is the explanation on how to use the CP command in docker, which will fix your issue with /. in end of SRC_PATH

SRC_PATH does not end with /.
the source directory is copied into this directory

SRC_PATH does end with /.
the content of the source directory is copied into this directory

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

move all files from "old" folders out into the parent as long as there are no files existing in the parent folder yet

From Dev

Moving all files from one folder to upper folder

From Dev

Retrieve all files from a server side folder

From Dev

Read all files from a folder c++

From Java

How to read all files in a folder from Java?

From Dev

Load all files from folder and subfolders

From Dev

Android - Load all files from a folder

From Dev

Access all files in folder from FileActivated file

From Dev

BCP import all files from a folder to database

From Dev

Copy all files from a list of folder locations

From Dev

Merge all pdf files from one folder

From Dev

Read all files from folder and edit

From Dev

import and read all files from a folder Python

From Dev

Run convert from VBScript on all files in a folder

From Dev

Delete all zip files from a folder recursivley

From Dev

Choose all files from a folder - Python

From Dev

Renaming all files in a folder

From Dev

How to copy all files from a folder (including sub-folder) while not copying the folder structure in python

From Dev

IsADirectoryError: [Errno 21] Is a directory: '/' while copying files from one folder to another existing folder Python

From Dev

chmod 775 on a folder but not all files under that folder

From Dev

chmod 775 on a folder but not all files under that folder

From Dev

Robocopy all files in a folder except that folder

From Dev

Moving files to a different folder, ignore the existing files

From Dev

Sorting files from a folder

From Dev

Files from folder to a dict?

From Dev

Powershell script to check if all files from a list of files exist in given folder folder

From Dev

Powershell script to check if all files from a list of files exist in given folder folder

From Java

How to .gitignore all files/folder in a folder, but not the folder itself?

From Dev

XCOPY only files from a parent folder and from all its subforlders to a new folder in Windows?

Related Related

  1. 1

    move all files from "old" folders out into the parent as long as there are no files existing in the parent folder yet

  2. 2

    Moving all files from one folder to upper folder

  3. 3

    Retrieve all files from a server side folder

  4. 4

    Read all files from a folder c++

  5. 5

    How to read all files in a folder from Java?

  6. 6

    Load all files from folder and subfolders

  7. 7

    Android - Load all files from a folder

  8. 8

    Access all files in folder from FileActivated file

  9. 9

    BCP import all files from a folder to database

  10. 10

    Copy all files from a list of folder locations

  11. 11

    Merge all pdf files from one folder

  12. 12

    Read all files from folder and edit

  13. 13

    import and read all files from a folder Python

  14. 14

    Run convert from VBScript on all files in a folder

  15. 15

    Delete all zip files from a folder recursivley

  16. 16

    Choose all files from a folder - Python

  17. 17

    Renaming all files in a folder

  18. 18

    How to copy all files from a folder (including sub-folder) while not copying the folder structure in python

  19. 19

    IsADirectoryError: [Errno 21] Is a directory: '/' while copying files from one folder to another existing folder Python

  20. 20

    chmod 775 on a folder but not all files under that folder

  21. 21

    chmod 775 on a folder but not all files under that folder

  22. 22

    Robocopy all files in a folder except that folder

  23. 23

    Moving files to a different folder, ignore the existing files

  24. 24

    Sorting files from a folder

  25. 25

    Files from folder to a dict?

  26. 26

    Powershell script to check if all files from a list of files exist in given folder folder

  27. 27

    Powershell script to check if all files from a list of files exist in given folder folder

  28. 28

    How to .gitignore all files/folder in a folder, but not the folder itself?

  29. 29

    XCOPY only files from a parent folder and from all its subforlders to a new folder in Windows?

HotTag

Archive