2017-12-27 193 views
0

我想dockerize我的SDK爲泊塢窗本地文件下載

docker run --rm -it -v /home/ubuntu/work/yoctosdk/:/workdir crops/extsdk-container --url file:///home/ubuntu/work/yocto/poky/build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-i586-toolchain-2.4.1.sh 

,不幸的是我得到

Attempting to download file:///home/ubuntu/work/yocto/poky/build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-i586-toolchain-2.4.1.sh 
curl: (37) Couldn't open file /home/ubuntu/work/yocto/poky/build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-i586-toolchain-2.4.1.sh 
Unable to download "file:///home/ubuntu/work/yocto/poky/build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-i586-toolchain-2.4.1.sh". 

我試圖解決這個下載並運行泊塢窗內的本地文件。什麼是正確的下載本地文件?我正在關注this

回答

0

默認情況下不能從主機訪問文件。您需要安裝要訪問Docker容器的文件夾。

要使文件/home/ubuntu/work/yocto/poky/build/tmp/deploy/sdk/poky-glibc-x86_64-core-image-minimal-i586-toolchain-2.4.1.sh訪問,使用安裝它的父目錄:

-v /home/ubuntu/work/yocto/poky/build/tmp/deploy/sdk:/home/ubuntu/work/yocto/sdk-installer 

,然後提供的URL路徑泊塢窗容器:

--url file:///home/ubuntu/work/yocto/sdk-installer/poky-glibc-x86_64-core-image-minimal-i586-toolchain-2.4.1.sh 

完整的命令:

docker run --rm -it -v /home/ubuntu/work/yoctosdk/:/workdir crops/extsdk-container -v /home/ubuntu/work/yocto/poky/build/tmp/deploy/sdk:/home/ubuntu/work/yocto/sdk-installer --url file:///home/ubuntu/work/yocto/sdk-installer/poky-glibc-x86_64-core-image-minimal-i586-toolchain-2.4.1.sh 
+0

似乎有一些腳本問題從https://github.com/crops/extsdk-container/ ubuntu @ ubuntu:〜$ docker run --rm -it -v/home/ubuntu/work/yoctosdk /:/ workdir crop/extsdk-container -v/home/ubuntu/work/yocto/poky/build/tmp/deploy/sdk:/ home/ubuntu/work/yocto/sdk-installer --url file:/// home/ubuntu/work/yocto/sdk-installer/poky-glibc-x86_64-core-image-minimal-i586-toolchain-2.4.1.sh 用法:esdk-entry.py [-h] [--url URL] [--workdir WORKDIR] esdk-entry。 py:error:無法識別的參數:-v/home/ubuntu/work/yocto/poky/build/tmp/deploy/sdk:/ home/ubuntu/work/yocto/sdk-installer – user3428154

+0

我做了這個docker run - rm -it -v/home/ubuntu/work/yocto/poky/build/tmp/deploy/sdk /:/ workdir crop/extsdk-container --url file:/// workdir/poky-glibc-x86_64-core- image-minimal-i586-toolchain-2.4.1.sh - 現在看來工作:) – user3428154