2018-02-14 09:35:54 |
Juan Fernandez |
description |
When installing docker-registry individually in a machine, it works well and the service can be started with systemd. But trying to enable it for boot time with
~# systemctl enable docker-registry
does not work. Also, when searching for it in the unit list, it shows as "static"
~# systemctl list-unit-files
UNIT FILE STATE
proc-sys-fs-binfmt_misc.automount static
...
docker-registry.service static
...
The only solution I found so far is to set the service as a desired one for multi-user.target.wants, by creating a symlink like
~# ln -s /lib/systemd/system/docker-registry.service /etc/systemd/system/multi-user.target.wants/docker-registry.service
Also, it seems to be an error in the /etc/init/docker-registry.conf startup script, showing a duplicate "/etc" component path in the CONFIG variable
description "the Docker toolset to pack, ship, store, and deliver content"
start on local-filesystems
stop on runlevel [!2345]
respawn
setuid docker-registry
script
BINARY=/usr/bin/$UPSTART_JOB
CONFIG=/etc/etc/docker/registry/config.yml
if [ -f /etc/default/$UPSTART_JOB ]; then
. /etc/default/$UPSTART_JOB
fi
exec "$BINARY" "$CONFIG"
end script
# vim:set ft=upstart: |
When installing docker-registry individually in a machine, it works well and the service can be started with systemd. But trying to enable it for boot time with
~# systemctl enable docker-registry
does not work. Also, when searching for it in the unit list, it shows as "static"
~# systemctl list-unit-files
UNIT FILE STATE
proc-sys-fs-binfmt_misc.automount static
...
docker-registry.service static
...
The only solution I found so far is to set the service as a desired one for multi-user.target.wants, by creating a symlink like
~# ln -s /lib/systemd/system/docker-registry.service /etc/systemd/system/multi-user.target.wants/docker-registry.service
Also, it seems to be an error in the /etc/init/docker-registry.conf upstart script, showing a duplicate "/etc" component path in the CONFIG variable
description "the Docker toolset to pack, ship, store, and deliver content"
start on local-filesystems
stop on runlevel [!2345]
respawn
setuid docker-registry
script
BINARY=/usr/bin/$UPSTART_JOB
CONFIG=/etc/etc/docker/registry/config.yml
if [ -f /etc/default/$UPSTART_JOB ]; then
. /etc/default/$UPSTART_JOB
fi
exec "$BINARY" "$CONFIG"
end script
# vim:set ft=upstart: |
|