mirror of
https://github.com/docker/compose.git
synced 2025-07-04 12:24:30 +02:00
Add source policies for build
Build{x,kit} support passing in source policies via an (expirimental) env var. This change adds those policies to the build request. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
8d81b87513
commit
2bf2b22fbe
@ -410,6 +410,11 @@ func (s *composeService) toBuildOptions(project *types.Project, service types.Se
|
||||
}}
|
||||
}
|
||||
|
||||
sp, err := build.ReadSourcePolicy()
|
||||
if err != nil {
|
||||
return build.Options{}, err
|
||||
}
|
||||
|
||||
return build.Options{
|
||||
Inputs: build.Inputs{
|
||||
ContextPath: service.Build.Context,
|
||||
@ -432,6 +437,7 @@ func (s *composeService) toBuildOptions(project *types.Project, service types.Se
|
||||
Ulimits: toUlimitOpt(service.Build.Ulimits),
|
||||
Session: sessionConfig,
|
||||
Allow: allow,
|
||||
SourcePolicy: sp,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user