Merge branch '2.7.x'

This commit is contained in:
Scott Frederick
2022-03-11 15:59:16 -06:00
24 changed files with 621 additions and 236 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 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.
@@ -33,6 +33,8 @@ public class Docker {
private String certPath;
private boolean bindHostToBuilder;
private DockerRegistry builderRegistry;
private DockerRegistry publishRegistry;
@@ -74,6 +76,18 @@ public class Docker {
this.certPath = certPath;
}
/**
* Whether to use the configured Docker host in the builder container.
* @return {@code true} to use the configured Docker host in the builder container
*/
public boolean isBindHostToBuilder() {
return this.bindHostToBuilder;
}
void setBindHostToBuilder(boolean bindHostToBuilder) {
this.bindHostToBuilder = bindHostToBuilder;
}
/**
* Configuration of the Docker registry where builder and run images are stored.
* @return the registry configuration
@@ -117,6 +131,7 @@ public class Docker {
DockerConfiguration asDockerConfiguration() {
DockerConfiguration dockerConfiguration = new DockerConfiguration();
dockerConfiguration = customizeHost(dockerConfiguration);
dockerConfiguration = dockerConfiguration.withBindHostToBuilder(this.bindHostToBuilder);
dockerConfiguration = customizeBuilderAuthentication(dockerConfiguration);
dockerConfiguration = customizePublishAuthentication(dockerConfiguration);
return dockerConfiguration;