0
0
mirror of https://github.com/thegeeklab/wp-docker-buildx.git synced 2024-06-02 18:29:42 +02:00

fix: only set max-concurrent-uploads if defined (#21)

This commit is contained in:
Robert Kaussow 2023-09-05 08:59:38 +02:00 committed by GitHub
parent b419036322
commit 742af367bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 7 deletions

View File

@ -7,7 +7,7 @@ when:
steps:
dryrun:
image: quay.io/thegeeklab/wp-docker-buildx:1
image: quay.io/thegeeklab/wp-docker-buildx:1.0.2
settings:
containerfile: Containerfile.multiarch
dry_run: true
@ -21,7 +21,7 @@ steps:
publish-dockerhub:
group: container
image: quay.io/thegeeklab/wp-docker-buildx:1
image: quay.io/thegeeklab/wp-docker-buildx:1.0.2
settings:
auto_tag: true
containerfile: Containerfile.multiarch
@ -42,7 +42,7 @@ steps:
publish-quay:
group: container
image: quay.io/thegeeklab/wp-docker-buildx:1
image: quay.io/thegeeklab/wp-docker-buildx:1.0.2
settings:
auto_tag: true
containerfile: Containerfile.multiarch

View File

@ -95,7 +95,6 @@ properties:
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

View File

@ -125,8 +125,8 @@ func settingsFlags(settings *plugin.Settings, category string) []cli.Flag {
&cli.StringFlag{
Name: "containerfile",
EnvVars: []string{"PLUGIN_CONTAINERFILE"},
Usage: "max concurrent uploads",
Value: "5",
Usage: "containerfile to use for the image build",
Value: "Containerfile",
Destination: &settings.Build.Containerfile,
Category: category,
},

View File

@ -214,7 +214,6 @@ 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",
}
@ -254,6 +253,10 @@ func commandDaemon(daemon Daemon) *execabs.Cmd {
args = append(args, "--experimental")
}
if daemon.MaxConcurrentUploads != "" {
args = append(args, "--max-concurrent-uploads", daemon.MaxConcurrentUploads)
}
return execabs.Command(dockerdBin, args...)
}