Merge pull request #481 from cdrage/add-build-to-service-config

Add 'build' to types.go
This commit is contained in:
Vincent Demeester
2017-09-13 18:20:42 +02:00
committed by GitHub
3 changed files with 41 additions and 2 deletions

View File

@ -79,6 +79,7 @@ type Config struct {
type ServiceConfig struct {
Name string
Build BuildConfig
CapAdd []string `mapstructure:"cap_add"`
CapDrop []string `mapstructure:"cap_drop"`
CgroupParent string `mapstructure:"cgroup_parent"`
@ -126,6 +127,18 @@ type ServiceConfig struct {
WorkingDir string `mapstructure:"working_dir"`
}
// BuildConfig is a type for build
// using the same format at libcompose: https://github.com/docker/libcompose/blob/master/yaml/build.go#L12
type BuildConfig struct {
Context string
Dockerfile string
Args MappingWithEquals
Labels Labels
CacheFrom StringList `mapstructure:"cache_from"`
Network string
Target string
}
// ShellCommand is a string or list of string args
type ShellCommand []string