Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 4c9df5d

Browse files
committed
yml build: add support for labels, cache_from, network, target
Signed-off-by: Nathan Sullivan <[email protected]>
1 parent d9b4886 commit 4c9df5d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

config/schema.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,11 @@ var servicesSchemaDataV2 = `{
219219
"properties": {
220220
"context": {"type": "string"},
221221
"dockerfile": {"type": "string"},
222-
"args": {"$ref": "#/definitions/list_or_dict"}
222+
"args": {"$ref": "#/definitions/list_or_dict"},
223+
"cache_from": {"$ref": "#/definitions/list_of_strings"},
224+
"labels": {"$ref": "#/definitions/list_or_dict"},
225+
"network": {"type": "string"},
226+
"target": {"type": "string"},
223227
},
224228
"additionalProperties": false
225229
}

docker/builder/builder.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ type DaemonBuilder struct {
4343
Pull bool
4444
BuildArgs map[string]*string
4545
CacheFrom []string
46+
Labels map[string]*string
47+
Network string
48+
Target string
4649
LoggerFactory logger.Factory
4750
}
4851

@@ -98,6 +101,9 @@ func (d *DaemonBuilder) Build(ctx context.Context, imageName string) error {
98101
AuthConfigs: d.AuthConfigs,
99102
BuildArgs: d.BuildArgs,
100103
CacheFrom: d.CacheFrom,
104+
Labels: d.Labels,
105+
NetworkMode: d.Network,
106+
Target: d.Target,
101107
})
102108
if err != nil {
103109
return err

0 commit comments

Comments
 (0)