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

Add docker section in .drone.yml with net option #573

Closed
wants to merge 1 commit into from
Closed

Add docker section in .drone.yml with net option #573

wants to merge 1 commit into from

Conversation

floatdrop
Copy link

This PR introduces docker section in .drone.yml file and net option in this section.

net option should be used to configure --net parameter of Docker container.

Default value: bridge

Example:

docker:
  net: host

@bradrydzewski
Copy link

Awesome! One minor comment. We should only enable custom network settings if b.Privileged && len(b.Repo.PR) == 0. The reason is that access to the host machines networking has security implications.

@floatdrop
Copy link
Author

@bradrydzewski fair point. I hope docker will be able work in bridge mode on IPv6-only hosts.

@floatdrop
Copy link
Author

May be this setting should be moved to other place, because checking for b.Privileged && len(b.Repo.PR) == 0 will disable net for pull-requests.

How about moving DefaultDockerNetworkMode to drone.toml? This would solve our IPv6 problems (we will set it to host for all builds) since we are in trusted environment and not exposing drone to external network.


On second thought - isn't it quite strange to change net option for only part of builds? Looks like huge source of bugs.

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.

None yet

2 participants