gpt4 book ai didi

linux - 在 Docker for Windows 中创建符号链接(symbolic link)失败,还不支持吗?

转载 作者:太空宇宙 更新时间:2023-11-04 12:32:06 26 4
gpt4 key购买 nike

我有一个运行 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 文件夹存在。我相信这是您命令中的一个简单错字。

关于linux - 在 Docker for Windows 中创建符号链接(symbolic link)失败,还不支持吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43030328/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com