mirror of
https://github.com/docker/compose.git
synced 2026-08-04 14:47:40 +00:00
Allow server to start on tcp port or if windows, named pipe rather than unix socket. could not yet make it work on named pipe from js client (connects but error)
This commit is contained in:
parent
23d2eacf84
commit
ecfffc6feb
6 changed files with 55 additions and 5 deletions
|
|
@ -2,7 +2,6 @@ package cmd
|
|||
|
||||
import (
|
||||
"context"
|
||||
"net"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
|
@ -39,10 +38,12 @@ func ServeCommand() *cobra.Command {
|
|||
func runServe(ctx context.Context, opts serveOpts) error {
|
||||
s := server.New()
|
||||
|
||||
listener, err := net.Listen("unix", opts.address)
|
||||
listener, err := server.CreateListener(opts.address)
|
||||
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "listen unix socket")
|
||||
return errors.Wrap(err, "listen address "+opts.address)
|
||||
}
|
||||
|
||||
// nolint errcheck
|
||||
defer listener.Close()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue