Merge branch '2.7.x'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,6 +39,8 @@ public class DockerSpec {
|
||||
|
||||
private String certPath;
|
||||
|
||||
private boolean bindHostToBuilder;
|
||||
|
||||
private final DockerRegistrySpec builderRegistry;
|
||||
|
||||
private final DockerRegistrySpec publishRegistry;
|
||||
@@ -83,6 +85,16 @@ public class DockerSpec {
|
||||
this.certPath = certPath;
|
||||
}
|
||||
|
||||
@Input
|
||||
@Optional
|
||||
public Boolean isBindHostToBuilder() {
|
||||
return this.bindHostToBuilder;
|
||||
}
|
||||
|
||||
public void setBindHostToBuilder(boolean use) {
|
||||
this.bindHostToBuilder = use;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the {@link DockerRegistrySpec} that configures authentication to the
|
||||
* builder registry.
|
||||
@@ -130,6 +142,7 @@ public class DockerSpec {
|
||||
DockerConfiguration asDockerConfiguration() {
|
||||
DockerConfiguration dockerConfiguration = new DockerConfiguration();
|
||||
dockerConfiguration = customizeHost(dockerConfiguration);
|
||||
dockerConfiguration = dockerConfiguration.withBindHostToBuilder(this.bindHostToBuilder);
|
||||
dockerConfiguration = customizeBuilderAuthentication(dockerConfiguration);
|
||||
dockerConfiguration = customizePublishAuthentication(dockerConfiguration);
|
||||
return dockerConfiguration;
|
||||
|
||||
Reference in New Issue
Block a user