配置远程 Docker Context 只需两行命令
1. 创建名为 remote-pc 的远程上下文:
docker context create remote-pc --docker "host=ssh://user@192.168.1.100"
2. 切换到该上下文:
docker context use remote-pc
此时执行 docker ps 将直接显示远程主机中的容器!
1. 创建名为 remote-pc 的远程上下文:
2. 切换到该上下文:
此时执行 docker ps 将直接显示远程主机中的容器!