0
0
mirror of https://github.com/thegeeklab/wp-docker-buildx.git synced 2024-11-24 23:00:39 +00:00

docs: fix buildkit config documentation (#166)

This commit is contained in:
Robert Kaussow 2023-01-08 14:41:49 +01:00 committed by GitHub
parent 8ff3997363
commit f907bd038a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 5 deletions

View File

@ -9,7 +9,7 @@ config
dockerfile
og
gzip
json
toml
config
host:ip
drone-docker-buildx

View File

@ -72,7 +72,19 @@ properties:
required: false
- name: buildkit_config
description: Content of the docker buildkit json config.
description: |
Content of the docker buildkit toml [config](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md). Example:
```TOML
- name: Build
image: thegeeklab/drone-docker-buildx:20
settings:
repo: example/repo
buildkit_config: |
[registry."registry.local:30081"]
http = true
insecure = true
```
type: string
defaultValue: false
required: false

View File

@ -109,7 +109,7 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
&cli.StringFlag{
Name: "daemon.buildkit-config",
EnvVars: []string{"PLUGIN_BUILDKIT_CONFIG"},
Usage: "content of the docker buildkit json config",
Usage: "content of the docker buildkit toml config",
Destination: &settings.Daemon.BuildkitConfig,
Category: category,
},

View File

@ -9,7 +9,7 @@ const (
dockerExe = "/usr/local/bin/docker"
dockerdExe = "/usr/local/bin/dockerd"
dockerHome = "/root/.docker/"
buildkitConfig = "/tmp/buildkit.json"
buildkitConfig = "/tmp/buildkit.toml"
)
func (p Plugin) startDaemon() {

View File

@ -146,7 +146,7 @@ func (p *Plugin) Execute() error {
if p.settings.Daemon.BuildkitConfig != "" {
err := os.WriteFile(buildkitConfig, []byte(p.settings.Daemon.BuildkitConfig), 0o600)
if err != nil {
return fmt.Errorf("error writing buildkit.json: %s", err)
return fmt.Errorf("error writing buildkit.toml: %s", err)
}
}