mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 15:28:35 +00:00
server: add socket activation
This adds the ability to socket activate docker by passing in `-H fd://*` along with examples systemd configuration files. The fastest way to test this is to run: ``` /usr/lib/systemd/systemd-activate -l 127.0.0.1:2001 /usr/bin/docker -d -H 'fd://*' docker -H tcp://127.0.0.1:2001 ps ``` Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
This commit is contained in:
@@ -767,6 +767,8 @@ func ParseHost(defaultHost string, defaultPort int, defaultUnix, addr string) (s
|
||||
case strings.HasPrefix(addr, "tcp://"):
|
||||
proto = "tcp"
|
||||
addr = strings.TrimPrefix(addr, "tcp://")
|
||||
case strings.HasPrefix(addr, "fd://"):
|
||||
return addr, nil
|
||||
case addr == "":
|
||||
proto = "unix"
|
||||
addr = defaultUnix
|
||||
|
||||
Reference in New Issue
Block a user