mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-22 10:10:39 +00:00
docs: fix buildkit config documentation (#166)
This commit is contained in:
parent
8ff3997363
commit
f907bd038a
@ -9,7 +9,7 @@ config
|
|||||||
dockerfile
|
dockerfile
|
||||||
og
|
og
|
||||||
gzip
|
gzip
|
||||||
json
|
toml
|
||||||
config
|
config
|
||||||
host:ip
|
host:ip
|
||||||
drone-docker-buildx
|
drone-docker-buildx
|
||||||
|
@ -72,7 +72,19 @@ properties:
|
|||||||
required: false
|
required: false
|
||||||
|
|
||||||
- name: buildkit_config
|
- 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
|
type: string
|
||||||
defaultValue: false
|
defaultValue: false
|
||||||
required: false
|
required: false
|
||||||
|
@ -109,7 +109,7 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "daemon.buildkit-config",
|
Name: "daemon.buildkit-config",
|
||||||
EnvVars: []string{"PLUGIN_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,
|
Destination: &settings.Daemon.BuildkitConfig,
|
||||||
Category: category,
|
Category: category,
|
||||||
},
|
},
|
||||||
|
@ -9,7 +9,7 @@ const (
|
|||||||
dockerExe = "/usr/local/bin/docker"
|
dockerExe = "/usr/local/bin/docker"
|
||||||
dockerdExe = "/usr/local/bin/dockerd"
|
dockerdExe = "/usr/local/bin/dockerd"
|
||||||
dockerHome = "/root/.docker/"
|
dockerHome = "/root/.docker/"
|
||||||
buildkitConfig = "/tmp/buildkit.json"
|
buildkitConfig = "/tmp/buildkit.toml"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (p Plugin) startDaemon() {
|
func (p Plugin) startDaemon() {
|
||||||
|
@ -146,7 +146,7 @@ func (p *Plugin) Execute() error {
|
|||||||
if p.settings.Daemon.BuildkitConfig != "" {
|
if p.settings.Daemon.BuildkitConfig != "" {
|
||||||
err := os.WriteFile(buildkitConfig, []byte(p.settings.Daemon.BuildkitConfig), 0o600)
|
err := os.WriteFile(buildkitConfig, []byte(p.settings.Daemon.BuildkitConfig), 0o600)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error writing buildkit.json: %s", err)
|
return fmt.Errorf("error writing buildkit.toml: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user