Aha, yes, thatâll do the trick! I forgot about that possibility.
Due to user requirements, I decided to just force all Docker jobs to host-type networking, since I havenât been able to figure out a way to pass something to this wrapper from the submit description to allow for user-specified options:
if [ "$cmd" = "run" -o "$cmd" = "create" ] ; then
set -- $cmd --network=host "$@"
exec /usr/bin/docker â$@â
I spent some time trying to figure out how to go about inserting the Docker port mappings for published ports to the HTCondor job, but there doesnât seem to be any sort of hook for that. May need an adjunct job to run a probe, or something
Thanks a bunch, Todd!
Michael V. Pelletier
HPC Support Team
Raytheon Missiles and Defense
From: Todd Tannenbaum <tannenba@xxxxxxxxxxx>
Sent: Tuesday, March 1, 2022 12:22 PM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Cc: Michael Pelletier <michael.v.pelletier@xxxxxxxxxxxx>
Subject: [External] Re: [HTCondor-users] Docker "host" networking or port publishing in v8.8.15 HTCondor submission?
On 3/1/2022 10:49 AM, Michael Pelletier via HTCondor-users wrote:
Iâm unfortunately stuck on version 8.8.15, and I donât see anything about how to change the default networking setting. The v9 has docker_network_type in condor_submit, but thereâs no mention of that capability in the 8.8 docs.
Is there an undocumented feature, perhaps, or some other way in the config or elsewhere to slip docker-run command line options like âpublish-all into the starterâs launcher?
A quick thought on the above:
If you are truly stuck on HTCondor v8.8, one idea is you could set the DOCKER config knob (which normally default to /usr/bin/docker) to point to your own wrapper script around the docker command-line binary. HTCondor v8.8. will invoke the binary specified
in this knob... your script could massage the command-line args however you wish and then finish your script with something like:
exec /usr/bin/docker "$@"
Not as nice as what can be done in HTCondor v9.x, but if your stuck you are stuck...