See gh-28844
@ -104,7 +104,7 @@ public final class DockerConfiguration {
public DockerConfiguration withEmptyPublishRegistryAuthentication() {
return new DockerConfiguration(this.host, this.builderAuthentication,
new DockerRegistryUserAuthentication("", "", "", ""));
new DockerRegistryUserAuthentication("", "", "", ""), this.bindHostToBuilder);
}
@ -74,7 +74,9 @@ class DockerSpecTests {
assertThat(host.getCertificatePath()).isNull();
assertThat(dockerConfiguration.isBindHostToBuilder()).isFalse();
assertThat(dockerSpec.asDockerConfiguration().getBuilderRegistryAuthentication()).isNull();
assertThat(dockerSpec.asDockerConfiguration().getPublishRegistryAuthentication()).isNull();
assertThat(decoded(dockerConfiguration.getPublishRegistryAuthentication().getAuthHeader()))
.contains("\"username\" : \"\"").contains("\"password\" : \"\"").contains("\"email\" : \"\"")
.contains("\"serveraddress\" : \"\"");
@Test
@ -57,7 +57,9 @@ class DockerTests {
assertThat(host.getCertificatePath()).isEqualTo("/tmp/ca-cert");
assertThat(docker.asDockerConfiguration().getBuilderRegistryAuthentication()).isNull();
assertThat(docker.asDockerConfiguration().getPublishRegistryAuthentication()).isNull();