Systemd init scripts not working for docker-registry

Bug #1749406 reported by Juan Fernandez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
docker-registry (Ubuntu)
New
Undecided
Unassigned

Bug 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 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:

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.