Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect docker example #14

Open
hmgle opened this issue Mar 6, 2019 · 2 comments
Open

Redirect docker example #14

hmgle opened this issue Mar 6, 2019 · 2 comments
Labels

Comments

@hmgle
Copy link
Owner

hmgle commented Mar 6, 2019

使用 docker 命令拉取镜像,实际上会通过 unix socket 通知运行于后台的 docker 进程,让后台的 docker 发出网络请求拉取镜像。因此,如果要让 docker 的网络请求走代理的话,需要停止后台的 docker 进程,再让 graftcp 重新启动 docker 进程就可以了。

例如:

sudo stop docker
sudo graftcp docker -d
docker pull hello-world

demo

@fenuo
Copy link

fenuo commented Dec 1, 2022

有没有更优雅的方法 线上的docker不能停止。

@hmgle
Copy link
Owner Author

hmgle commented Dec 1, 2022

有没有更优雅的方法 线上的docker不能停止。

可以看下 docker 的最新文档:https://docs.docker.com/network/proxy/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants