mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-22 00:00:40 +00:00
feat: add daemon option max-concurrent-uploads (#18)
This commit is contained in:
parent
ecf9348149
commit
787934288e
@ -90,6 +90,14 @@ properties:
|
||||
defaultValue: false
|
||||
required: false
|
||||
|
||||
- name: max_concurrent_uploads
|
||||
description: |
|
||||
By default the Docker daemon will push five layers of an image at a time. If you are on a low bandwidth connection this may cause
|
||||
timeout issues and you may want to lower with this option.
|
||||
type: string
|
||||
defaultValue: 5
|
||||
required: false
|
||||
|
||||
- name: containerfile
|
||||
description: Set the containerfile to use for the image build.
|
||||
defaultValue: Containerfile
|
||||
|
@ -115,11 +115,18 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
|
||||
Destination: &settings.Daemon.BuildkitConfig,
|
||||
Category: category,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "daemon.max-concurrent-uploads",
|
||||
EnvVars: []string{"PLUGIN_MAX_CONCURRENT_UPLOADS"},
|
||||
Usage: "max concurrent uploads for each push",
|
||||
Destination: &settings.Daemon.MaxConcurrentUploads,
|
||||
Category: category,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "containerfile",
|
||||
EnvVars: []string{"PLUGIN_CONTAINERFILE"},
|
||||
Usage: "containerfile to use for the image build",
|
||||
Value: "Containerfile",
|
||||
Usage: "max concurrent uploads",
|
||||
Value: "5",
|
||||
Destination: &settings.Build.Containerfile,
|
||||
Category: category,
|
||||
},
|
||||
|
@ -214,6 +214,7 @@ func hasProxyBuildArg(build *Build, key string) bool {
|
||||
func commandDaemon(daemon Daemon) *execabs.Cmd {
|
||||
args := []string{
|
||||
"--data-root", daemon.StoragePath,
|
||||
"--max-concurrent-uploads", daemon.MaxConcurrentUploads,
|
||||
"--host=unix:///var/run/docker.sock",
|
||||
}
|
||||
|
||||
@ -229,11 +230,11 @@ func commandDaemon(daemon Daemon) *execabs.Cmd {
|
||||
args = append(args, "--ipv6")
|
||||
}
|
||||
|
||||
if len(daemon.Mirror) != 0 {
|
||||
if daemon.Mirror != "" {
|
||||
args = append(args, "--registry-mirror", daemon.Mirror)
|
||||
}
|
||||
|
||||
if len(daemon.Bip) != 0 {
|
||||
if daemon.Bip != "" {
|
||||
args = append(args, "--bip", daemon.Bip)
|
||||
}
|
||||
|
||||
@ -245,7 +246,7 @@ func commandDaemon(daemon Daemon) *execabs.Cmd {
|
||||
args = append(args, "--dns-search", dnsSearch)
|
||||
}
|
||||
|
||||
if len(daemon.MTU) != 0 {
|
||||
if daemon.MTU != "" {
|
||||
args = append(args, "--mtu", daemon.MTU)
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ type Daemon struct {
|
||||
IPv6 bool // Docker daemon IPv6 networking
|
||||
Experimental bool // Docker daemon enable experimental mode
|
||||
BuildkitConfig string // Docker buildkit config
|
||||
MaxConcurrentUploads string
|
||||
}
|
||||
|
||||
// Login defines Docker login parameters.
|
||||
|
Loading…
Reference in New Issue
Block a user