github.com/MOXA-ISD/edge-library-libcompose@v0.4.1-0.20200417083957-c90441e63650/project/project_build.go (about) 1 package project 2 3 import ( 4 "golang.org/x/net/context" 5 6 "github.com/docker/libcompose/project/events" 7 "github.com/docker/libcompose/project/options" 8 ) 9 10 // Build builds the specified services (like docker build). 11 func (p *Project) Build(ctx context.Context, buildOptions options.Build, services ...string) error { 12 return p.perform(events.ProjectBuildStart, events.ProjectBuildDone, services, wrapperAction(func(wrapper *serviceWrapper, wrappers map[string]*serviceWrapper) { 13 wrapper.Do(wrappers, events.ServiceBuildStart, events.ServiceBuild, func(service Service) error { 14 return service.Build(ctx, buildOptions) 15 }) 16 }), nil) 17 }