planemo
planemo copied to clipboard
DNS not resolved inside container tool when using --mulled_containers
When starting planemo with with mulled containers support I get that tools which require DNS resolution (because for instance they need to download something) cannot resolve DNS addresses. If I run the same tool container manually through docker run, the container can resolve things fine. In both cases, the injected content on /etc/resolve.conf
is the same. Maybe this is a wider Galaxy issue if the docker networking is being handled in any particular way by Galaxy
On docker inspect
on the two cases, tool container sent by Galaxy and container run directly, I can see that the Galaxy one has "NetworkMode": "none"
where as the working one has "NetworkMode": "default"
. Is Galaxy on planemo actively setting this somehow?
I see that the way forward is to insert a parameter in the job_conf.xml for the destination:
<param id="docker_net">default</param>
I see as well that within the default planemo destination there is a ${docker_host_param}
placeholder (but I don't see any arguments in planemo with this name). Is there a straight forward way to trigger this from the cli, or it would require adding an option? Happy to PR.
I think Galaxy purposely disables network access by default - for security and for reproducibility:
<!-- By default, docker container will not have any networking
enabled. host networking can be bridged by uncommenting next option
http://docs.docker.io/reference/run/#network-settings
-->
<!-- <param id="docker_net">bridge</param> -->
Yeah - I think you just need to add an option to options.py, add it to docker_config_options, and then use it when building the job_conf in planemo.galaxy.config.