How to list files in a stopped Docker container

前端 未结 6 1268
深忆病人
深忆病人 2021-02-03 20:25

This question shows how to copy files out of a stopped container. This requires that I know the full path to the file including its file name. I know the directory I want to c

6条回答
  •  借酒劲吻你
    2021-02-03 21:15

    docker container cp : -
    

    Notice the "-" at the end of the command.

    It actually "copies" the specified file from the stopped container into "stdout". In other words, it just prints the file contents.

    Thanks @azat-khadiev for your direction (I don't know why you got "-1 for that answer...)

提交回复
热议问题