-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Services do not operate correctly when docker net host option is specified #839
Comments
cool, we can test it out and see. I think we must have accepted a competing pull request (I'll verify), because you can specify the net parameter in your yaml:
|
@bradrydzewski sorry I might not have been clear in my original message...
This results in:
|
When the image runs with `--net host`, docker links will not work. This commit checks to see if `--net host` has been set, and if so creates the services in `--net host` also. Fixes harness#839 Signed-off-by: Dave Tucker <[email protected]>
When the image runs with `--net host`, docker links will not work. This commit checks to see if `--net host` has been set, and if so creates the services in `--net host` also. Fixes harness#839 Signed-off-by: Dave Tucker <[email protected]>
When the image runs with `--net host`, docker links will not work. This commit checks to see if `--net host` has been set, and if so creates the services in `--net host` also. Fixes harness#839 Signed-off-by: Dave Tucker <[email protected]>
@dave-tucker can you give a hint, why you need a |
@floatdrop we need our |
@dave-tucker I'm working on a patch that implement |
Without drone supporting vagrant directly, where VM's are needed (involving building VM images, testing software making use of kernel modules, alternative OS's, etc) use of --net=host seems like it would be required for vagrant inside of a container image to be able to talk to VM's launched via libvirt. Something like https://hub.docker.com/r/twiest/docker-vagrant-libvirt/ Just evaluating drone here as a replacement, and to be able to limit the use of VM's to just the project being tested rather than needing to also bring up additional services it needs as VM's along side it would be very useful. |
The addition of
--net
in #617 is awesome, I need it, but I may have found a bug - I don't have bandwidth to test this one out at the moment though...The implementation of
services
looks to rely on Docker Linkshttps://github.com/drone/drone/blob/0a6227930dce3e356667506bc950530a9d847c61/shared/build/build.go#L346
Links and
--net=host
are not supported moby/moby#7066A possible workaround might be to run service containers in
--net=host
but you might run in to port conflict issues if you are, for example, using postgres as the backend for your Drone install and attempting to run a postgres service.The text was updated successfully, but these errors were encountered: