Add compose service, run compose up through API

Signed-off-by: Guillaume Tardif <guillaume.tardif@docker.com>
This commit is contained in:
Guillaume Tardif 2020-11-16 12:11:52 +01:00
parent 0ae42dea04
commit 5abc68ebdd
3 changed files with 66 additions and 0 deletions

View file

@ -23,6 +23,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
composev1 "github.com/docker/compose-cli/protos/compose/v1"
containersv1 "github.com/docker/compose-cli/protos/containers/v1"
contextsv1 "github.com/docker/compose-cli/protos/contexts/v1"
streamsv1 "github.com/docker/compose-cli/protos/streams/v1"
@ -64,6 +65,7 @@ func runServe(ctx context.Context, opts serveOpts) error {
p := proxy.New(ctx)
composev1.RegisterComposeServer(s, p)
containersv1.RegisterContainersServer(s, p)
contextsv1.RegisterContextsServer(s, p.ContextsProxy())
streamsv1.RegisterStreamingServer(s, p)