Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Commit f907bd0

Browse files
authored
docs: fix buildkit config documentation (#166)
1 parent 8ff3997 commit f907bd0

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

.dictionary

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ config
99
dockerfile
1010
og
1111
gzip
12-
json
12+
toml
1313
config
1414
host:ip
1515
drone-docker-buildx

_docs/data/data.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,19 @@ properties:
7272
required: false
7373

7474
- name: buildkit_config
75-
description: Content of the docker buildkit json config.
75+
description: |
76+
Content of the docker buildkit toml [config](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md). Example:
77+
78+
```TOML
79+
- name: Build
80+
image: thegeeklab/drone-docker-buildx:20
81+
settings:
82+
repo: example/repo
83+
buildkit_config: |
84+
[registry."registry.local:30081"]
85+
http = true
86+
insecure = true
87+
```
7688
type: string
7789
defaultValue: false
7890
required: false

cmd/drone-docker-buildx/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
109109
&cli.StringFlag{
110110
Name: "daemon.buildkit-config",
111111
EnvVars: []string{"PLUGIN_BUILDKIT_CONFIG"},
112-
Usage: "content of the docker buildkit json config",
112+
Usage: "content of the docker buildkit toml config",
113113
Destination: &settings.Daemon.BuildkitConfig,
114114
Category: category,
115115
},

plugin/daemon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const (
99
dockerExe = "/usr/local/bin/docker"
1010
dockerdExe = "/usr/local/bin/dockerd"
1111
dockerHome = "/root/.docker/"
12-
buildkitConfig = "/tmp/buildkit.json"
12+
buildkitConfig = "/tmp/buildkit.toml"
1313
)
1414

1515
func (p Plugin) startDaemon() {

plugin/impl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func (p *Plugin) Execute() error {
146146
if p.settings.Daemon.BuildkitConfig != "" {
147147
err := os.WriteFile(buildkitConfig, []byte(p.settings.Daemon.BuildkitConfig), 0o600)
148148
if err != nil {
149-
return fmt.Errorf("error writing buildkit.json: %s", err)
149+
return fmt.Errorf("error writing buildkit.toml: %s", err)
150150
}
151151
}
152152

0 commit comments

Comments
 (0)