Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions loader/full-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ services:
- foo:v1.0.0
- docker.io/username/foo:my-other-tag
- ${COMPOSE_PROJECT_NAME}:1.0.0
platforms:
- linux/amd64
- linux/arm64


cap_add:
Expand Down
10 changes: 9 additions & 1 deletion loader/full-struct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ func services(workingDir, homeDir string) []types.ServiceConfig {
Mode: uint32Ptr(0440),
},
},
Tags: []string{"foo:v1.0.0", "docker.io/username/foo:my-other-tag", "full_example_project_name:1.0.0"},
Tags: []string{"foo:v1.0.0", "docker.io/username/foo:my-other-tag", "full_example_project_name:1.0.0"},
Platforms: []string{"linux/amd64", "linux/arm64"},
},
CapAdd: []string{"ALL"},
CapDrop: []string{"NET_ADMIN", "SYS_ADMIN"},
Expand Down Expand Up @@ -605,6 +606,9 @@ services:
- foo:v1.0.0
- docker.io/username/foo:my-other-tag
- full_example_project_name:1.0.0
platforms:
- linux/amd64
- linux/arm64
cap_add:
- ALL
cap_drop:
Expand Down Expand Up @@ -1140,6 +1144,10 @@ func fullExampleJSON(workingDir, homeDir string) string {
"foo:v1.0.0",
"docker.io/username/foo:my-other-tag",
"full_example_project_name:1.0.0"
],
"platforms": [
"linux/amd64",
"linux/arm64"
]
},
"cap_add": [
Expand Down
3 changes: 2 additions & 1 deletion schema/compose-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@
"extra_hosts": {"$ref": "#/definitions/list_or_dict"},
"isolation": {"type": "string"},
"secrets": {"$ref": "#/definitions/service_config_or_secret"},
"tags": {"type": "array", "items": {"type": "string"}}
"tags": {"type": "array", "items": {"type": "string"}},
"platforms": {"type": "array", "items": {"type": "string"}}
},
"additionalProperties": false,
"patternProperties": {"^x-": {}}
Expand Down
1 change: 1 addition & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ type BuildConfig struct {
Target string `yaml:",omitempty" json:"target,omitempty"`
Secrets []ServiceSecretConfig `yaml:",omitempty" json:"secrets,omitempty"`
Tags StringList `mapstructure:"tags" yaml:"tags,omitempty" json:"tags,omitempty"`
Platforms StringList `mapstructure:"platforms" yaml:"platforms,omitempty" json:"platforms,omitempty"`

Extensions map[string]interface{} `yaml:",inline" json:"-"`
}
Expand Down