[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] Propagate DOCKER_CONFIG to docker universe



Hello everybody,


I am new to Condor and I am struggling to connect to a private docker registry, which I have no control over, so a nginx proxy does not work.

I also checked this: https://www-auth.cs.wisc.edu/lists/htcondor-users/2017-October/msg00113.shtml

But unfortunately it does not seem to work for me and I get an `access forbidden` and I do not find much more information about the topic.


I am running a setup where the actual owner is executing the job and the credentials are stored in `${HOME}/.docker/config.json`.

This fails:
```
universe                = docker
docker_image            = <private-image>
RunAsOwner              = True
output                  = stdout.log
error                   = stderr.log
log                     = stdlog.log
queue
```

But this works:
```
executable              = /usr/bin/docker
arguments               = "pull <private-image>"
output                  = stdout.log
error                   = stderr.log
log                     = stdlog.log

RunAsOwner              = True
queue

```
as well as if there is no home directory at all and the credentials are stored in `/etc/docker/userconf/config.json`:
```
executable              = /usr/bin/docker
arguments               = "pull <private-image>"
output                  = stdout.log
error                   = stderr.log
log                     = stdlog.log

RunAsOwner              = True
environment             = "DOCKER_CONFIG=/etc/docker/userconf"
queue

```

So apparently, the docker universe does not read the `config.json` for the user or from the DOCKER_CONFIG variable?
I tried to put
```
DOCKER_CONFIG = /etc/docker/userconf
```
in `/etc/condor/config.d/01-execute.config` , but this does not seem to be applied.

I also tried to set the variable in a PreEnvironment, but I read that it is not propagated to the execution environment.

Does anyone have further ideas how to use the docker universe with a private docker registry?

Thank you very much,
Markus