簡體   English   中英

在Windows的Docker中創建符號鏈接失敗,還不支持嗎?

[英]Create symbolic link fails in Docker for Windows, it's not supported yet?

我有一個運行Ubuntu Server的Docker容器。 我正在運行Windows的Docker,並且分別安裝了以下版本的Docker和Docker Compose:

> docker-compose -v
docker-compose version 1.11.2, build f963d76f

> docker -v
Docker version 17.03.1-ce-rc1, build 3476dbf

到目前為止,這是我一直未嘗試的嘗試:

// The dojo linked file exists so I've tried to update it as per this answer (http://stackoverflow.com/a/1951752/719427)
> docker exec -it dockeramp_webserver_1 ln -sf /var/www/html/externals/dojo /var/www/html/externals/public_html/js/dojo
ln: failed to create symbolic link '/var/www/html/externals/public_html/js/dojo': No such file or directory

// I have deleted the previous linked file and then I tried to create a new one
> docker exec -it dockeramp_webserver_1 ln -s /var/www/html/externals/dojo /var/www/html/externals/public_html/js/dojo
ln: failed to create symbolic link '/var/www/html/externals/public_html/js/dojo': No such file or directory

// removed the directory name from the link name
> docker exec -it dockeramp_webserver_1 ln -s /var/www/html/externals/dojo /var/www/html/externals/public_html/js    
ln: failed to create symbolic link '/var/www/html/externals/public_html/js': No such file or directory

因為錯誤一直說目錄不存在,所以我檢查了錯誤是對還是錯:

> docker exec -u www-data -it dockeramp_webserver_1 ls -la /var/www/html/externals/dojo
total 80
drwxr-xr-x 2 root root     0 Mar 25 15:09 .
drwxr-xr-x 2 root root  4096 Mar 25 15:09 ..
drwxr-xr-x 2 root root     0 Mar 25 15:09 dijit
drwxr-xr-x 2 root root     0 Mar 25 15:09 dojo
drwxr-xr-x 2 root root     0 Mar 25 15:09 dojox
drwxr-xr-x 2 root root     0 Mar 25 15:09 mmi
-rwxr-xr-x 1 root root 74047 Mar 25 15:09 tundra.css

> docker exec -u www-data -it dockeramp_webserver_1 ls -la /var/www/html/public_html/js
total 24
drwxr-xr-x 2 root root 4096 Mar 26 14:40 .
drwxr-xr-x 2 root root 4096 Mar 25 15:11 ..
-rwxr-xr-x 1 root root 7123 Mar 25 15:09 jquery.PrintArea.js
-rwxr-xr-x 1 root root 6141 Mar 25 15:11 quoteit_delegate_search.js

他們倆都存在,所以...我在這里想念什么? Windows尚不支持嗎? 我發現開發團隊在以前的版本中比我的版本增加了一個名為mfsymlinks的東西。

該命令告訴您/var/www/html/externals/public_html不存在。 您僅顯示了/var/www/html/externals/dojo/var/www/html/public_html/js文件夾。 我相信這是您命令中的簡單錯字。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM