Copy multiple directories with one command

后端 未结 2 1614
猫巷女王i
猫巷女王i 2020-12-18 17:35

Is there any way to copy multiple directories in one command, to reduce the number of layers? E.g., instead of:

COPY dirone ./dirone
COPY dirtwo ./dirtwo
COP         


        
2条回答
  •  时光取名叫无心
    2020-12-18 18:16

    That's the documented behavior of the copy command:

    If is a directory, the entire contents of the directory are copied, including filesystem metadata.

    Note: The directory itself is not copied, just its contents.

    Best workaround I can suggest is to change your directory layout in your build folder, move the three folders under one parent folder and add the parent.

提交回复
热议问题