Somthing like 20605eb310f0b57bd06eea80ec63c5022fc83bde
Docker-DCO-1.1-Signed-off-by: Brandon Philips <brandon.philips@coreos.com> (github: philips)
| ... | ... |
@@ -63,8 +63,8 @@ the ``-H`` flag for the client. |
| 63 | 63 |
# both are equal |
| 64 | 64 |
|
| 65 | 65 |
|
| 66 |
-To run the daemon with `systemd socket activation <http://0pointer.de/blog/projects/socket-activation.html>`, use ``docker -d -H fd://*``. |
|
| 67 |
-Using ``fd://*`` will work perfectly for most setups but you can also specify individual sockets too ``docker -d -H fd://3``. |
|
| 66 |
+To run the daemon with `systemd socket activation <http://0pointer.de/blog/projects/socket-activation.html>`, use ``docker -d -H fd://``. |
|
| 67 |
+Using ``fd://`` will work perfectly for most setups but you can also specify individual sockets too ``docker -d -H fd://3``. |
|
| 68 | 68 |
If the specified socket activated files aren't found then docker will exit. |
| 69 | 69 |
You can find examples of using systemd socket activation with docker and systemd in the `docker source tree <https://github.com/dotcloud/docker/blob/master/contrib/init/systemd/socket-activation/>`. |
| 70 | 70 |
|
| ... | ... |
@@ -17,6 +17,11 @@ func ListenFD(addr string) ([]net.Listener, error) {
|
| 17 | 17 |
return nil, errors.New("No sockets found")
|
| 18 | 18 |
} |
| 19 | 19 |
|
| 20 |
+ // default to all fds just like unix:// and tcp:// |
|
| 21 |
+ if addr == "" {
|
|
| 22 |
+ addr = "*" |
|
| 23 |
+ } |
|
| 24 |
+ |
|
| 20 | 25 |
fdNum, _ := strconv.Atoi(addr) |
| 21 | 26 |
fdOffset := fdNum - 3 |
| 22 | 27 |
if (addr != "*") && (len(files) < int(fdOffset)+1) {
|