user@host:~$ id=$(docker create “映像檔ID”)
user@host:~$ docker cp $id:”檔案的映像檔內部路徑” - > “檔案的外部存放路徑”(因為會打包成tar檔,所以副檔名要為.tar)
user@host:~$ docker rm -v $id
參考來源:Docker - how can I copy a file from an image to a host?
docker — 2024年2月19日
Made with ❤ and at Taiwan.