mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-22 10:10:39 +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
|
defaultValue: false
|
||||||
required: 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
|
- name: containerfile
|
||||||
description: Set the containerfile to use for the image build.
|
description: Set the containerfile to use for the image build.
|
||||||
defaultValue: Containerfile
|
defaultValue: Containerfile
|
||||||
|
@ -115,11 +115,18 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
|
|||||||
Destination: &settings.Daemon.BuildkitConfig,
|
Destination: &settings.Daemon.BuildkitConfig,
|
||||||
Category: category,
|
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{
|
&cli.StringFlag{
|
||||||
Name: "containerfile",
|
Name: "containerfile",
|
||||||
EnvVars: []string{"PLUGIN_CONTAINERFILE"},
|
EnvVars: []string{"PLUGIN_CONTAINERFILE"},
|
||||||
Usage: "containerfile to use for the image build",
|
Usage: "max concurrent uploads",
|
||||||
Value: "Containerfile",
|
Value: "5",
|
||||||
Destination: &settings.Build.Containerfile,
|
Destination: &settings.Build.Containerfile,
|
||||||
Category: category,
|
Category: category,
|
||||||
},
|
},
|
||||||
|
@ -214,6 +214,7 @@ func hasProxyBuildArg(build *Build, key string) bool {
|
|||||||
func commandDaemon(daemon Daemon) *execabs.Cmd {
|
func commandDaemon(daemon Daemon) *execabs.Cmd {
|
||||||
args := []string{
|
args := []string{
|
||||||
"--data-root", daemon.StoragePath,
|
"--data-root", daemon.StoragePath,
|
||||||
|
"--max-concurrent-uploads", daemon.MaxConcurrentUploads,
|
||||||
"--host=unix:///var/run/docker.sock",
|
"--host=unix:///var/run/docker.sock",
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -229,11 +230,11 @@ func commandDaemon(daemon Daemon) *execabs.Cmd {
|
|||||||
args = append(args, "--ipv6")
|
args = append(args, "--ipv6")
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(daemon.Mirror) != 0 {
|
if daemon.Mirror != "" {
|
||||||
args = append(args, "--registry-mirror", daemon.Mirror)
|
args = append(args, "--registry-mirror", daemon.Mirror)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(daemon.Bip) != 0 {
|
if daemon.Bip != "" {
|
||||||
args = append(args, "--bip", daemon.Bip)
|
args = append(args, "--bip", daemon.Bip)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -245,7 +246,7 @@ func commandDaemon(daemon Daemon) *execabs.Cmd {
|
|||||||
args = append(args, "--dns-search", dnsSearch)
|
args = append(args, "--dns-search", dnsSearch)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(daemon.MTU) != 0 {
|
if daemon.MTU != "" {
|
||||||
args = append(args, "--mtu", daemon.MTU)
|
args = append(args, "--mtu", daemon.MTU)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,20 +21,21 @@ type Settings struct {
|
|||||||
|
|
||||||
// Daemon defines Docker daemon parameters.
|
// Daemon defines Docker daemon parameters.
|
||||||
type Daemon struct {
|
type Daemon struct {
|
||||||
Registry string // Docker registry
|
Registry string // Docker registry
|
||||||
Mirror string // Docker registry mirror
|
Mirror string // Docker registry mirror
|
||||||
Insecure bool // Docker daemon enable insecure registries
|
Insecure bool // Docker daemon enable insecure registries
|
||||||
StorageDriver string // Docker daemon storage driver
|
StorageDriver string // Docker daemon storage driver
|
||||||
StoragePath string // Docker daemon storage path
|
StoragePath string // Docker daemon storage path
|
||||||
Disabled bool // DOcker daemon is disabled (already running)
|
Disabled bool // DOcker daemon is disabled (already running)
|
||||||
Debug bool // Docker daemon started in debug mode
|
Debug bool // Docker daemon started in debug mode
|
||||||
Bip string // Docker daemon network bridge IP address
|
Bip string // Docker daemon network bridge IP address
|
||||||
DNS cli.StringSlice // Docker daemon dns server
|
DNS cli.StringSlice // Docker daemon dns server
|
||||||
DNSSearch cli.StringSlice // Docker daemon dns search domain
|
DNSSearch cli.StringSlice // Docker daemon dns search domain
|
||||||
MTU string // Docker daemon mtu setting
|
MTU string // Docker daemon mtu setting
|
||||||
IPv6 bool // Docker daemon IPv6 networking
|
IPv6 bool // Docker daemon IPv6 networking
|
||||||
Experimental bool // Docker daemon enable experimental mode
|
Experimental bool // Docker daemon enable experimental mode
|
||||||
BuildkitConfig string // Docker buildkit config
|
BuildkitConfig string // Docker buildkit config
|
||||||
|
MaxConcurrentUploads string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Login defines Docker login parameters.
|
// Login defines Docker login parameters.
|
||||||
|
Loading…
Reference in New Issue
Block a user