@%@UCRWARNING=# @%@

# Here in Debian, this file is sourced by:
#   - /etc/init.d/docker (sysvinit)
#   - /etc/init/docker (upstart)
#   - systemd's docker.service

# Use of this file for configuring your Docker daemon is discouraged.

# The recommended alternative is "/etc/docker/daemon.json", as described in:
#   https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file

# If that does not suit your needs, try a systemd drop-in file, as described in:
#   https://docs.docker.com/config/daemon/systemd/
@!@
# backwards compatibility:
docker_opts = ''
for var in configRegistry:
    if var in (
        'docker/daemon/default/opts/max-file',
        'docker/daemon/default/opts/max-size',
        'docker/daemon/default/opts/bip',
        'docker/daemon/default/opts/log-driver',
        'docker/daemon/default/parameter/live-restore',
        'docker/daemon/default/opts/registry-mirrors',
    ):
        continue  # already configured via json
    if var.startswith('docker/daemon/default/opts'):
        opt = var.split('/')[-1]
        docker_opts += '--%s=%s ' % (opt, configRegistry[var])
    elif var.startswith('docker/daemon/default/parameter') and configRegistry.is_true(var):
        opt = var.split('/')[-1]
        docker_opts += '--%s ' % (opt)
if docker_opts:
    print('DOCKER_OPTS="%s"' % docker_opts)
@!@

# If you need Docker to use an HTTP proxy, it can also be specified here.
@!@
pr = configRegistry.get("proxy/http")
if pr:
    print('export http_proxy="%s"' % pr)
else:
    print('#export http_proxy="http://127.0.0.1:3128/" set UCR variable proxy/http to change this')
@!@
