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

docker: Fix container network specification #82

Merged
merged 1 commit into from
Jul 15, 2024
Merged

Conversation

iBug
Copy link
Member

@iBug iBug commented Jul 15, 2024

Docker CLI 是将 --network 参数放在 HostConfig.NetworkMode 里的,此结论通过以下命令获得

$ nc -l -p 2375 <<< $'HTTP/1.1 200 OK\r\nServer: docker\r\n\r'
$ docker -H tcp://localhost run --rm --network=test alpine

@iBug iBug enabled auto-merge (squash) July 15, 2024 09:04
@iBug iBug merged commit e0fb360 into main Jul 15, 2024
3 checks passed
@iBug iBug deleted the fix/docker-network branch July 15, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant