note: The File sharing tab is only available in Hyper-V mode because the files are automatically shared in WSL 2 mode and Windows container mode.
使用挂载命令时,windows系统会提示是否共享文件,同意即可
如果没有,就需要在setting->resources->file sharing中先设置共享
本地ssh连接Ubuntu Docker
(想要在本地与docker容器协作项目,可以直接共享文件,不用这么麻烦)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# 本地操作 docker run -itd -p 50003:22 --name docker-name ubuntu:22.04
$ docker run -itd --name zipkin -p 9411:9411 openzipkin/zipkin 1f912138540789c77cff413c868789467c8f69d8445960042c99423de35da9ca docker: Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:9411 -> 0.0.0.0:0: listen tcp 0.0.0.0:9411: bind: An attempt was made to access a socket in a way forbidden by its access permissions.