搬运工问题

text
阅读 41 收藏 0 点赞 0 评论 0

docker20180603
sudo docker run -p 8080:3000 -e "WIKI_ADMIN_EMAIL=admin@example.com" -v /home/bob/wiki-config.yml:/var/wiki/config.yml requarks/wiki
Password:
docker: Error response from daemon: Mounts denied: 
The path /home/bob/wiki-config.yml
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.
mac机子上/home/bob/wiki-config.yml没有共享,将本机/home/bob/wiki-config.yml映射到容器的/var/wiki/config.yml
如果mac机子上/home/bob/wiki-config.yml找不到就会报错。

Much of the macOS file system that is accessible to the user is also available 
to containers using the -v bind mount syntax. The following command runs a 
container from an image called r-base and shares the macOS user’s 
~/Desktop/ directory as /Desktop in the container.

from:https://docs.docker.com/docker-for-mac/osxfs/#access-control

2.sudo docker run -p 8080:3000 -e "WIKI_ADMIN_EMAIL=admin@example.com" -v /Users/Shared/wiki-config.yml:/var/wiki/config.yml requarks/wiki
打开本机ip 192.168.0.106:3000或192.168.0.106:8080都不能访问。
把端口改成8080就行了,和wiki-config.yml里面的端口一致。
sudo docker run -p 8080:8080 -e "WIKI_ADMIN_EMAIL=admin@example.com" -v /Users/Shared/wiki-config.yml:/var/wiki/config.yml requarks/wiki

参考:https://github.com/Requarks/wiki/issues/340

3.能访问网站,缺少样式。Weird display, no styling, missing CSS
Cause: The value you entered for the host config parameter is wrong.

Solution: This value should correspond to the host/domain users are using to access your wiki, including the port if different than 80 / 443.

For example, if you access your wiki at https://my.host.com:1234, you must set your host to  https://my.host.com:1234. This has no relation to the server port. It must match exactly the URL and port used by the client to access the wiki.
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号