Skip to content

Commit 8fe6943

Browse files
author
Marcus Linke
committed
Merge remote-tracking branch 'origin/2.x'
Conflicts: CHANGELOG.md
2 parents 9f77972 + dd02203 commit 8fe6943

3 files changed

Lines changed: 18 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Notes
88
* The upcoming release will contain multiple API breaking changes therefore the major version switch. It will supports a subset of v.1.21 of the docker remote API.
99

1010
All changes
11+
12+
* [#396] (https://github.com/docker-java/docker-java/pull/396) Disable evaluation of http.proxy... variables when using unix socket connection
1113
* [#393] (https://github.com/docker-java/docker-java/pull/392) Support ONBUILD instruction in Dockerfiles
1214
* [#392] (https://github.com/docker-java/docker-java/pull/392) Introduce InspectContainerResponse.Mounts
1315
* [#387] (https://github.com/docker-java/docker-java/pull/387) Make ProgressDetails attributes public
@@ -18,6 +20,12 @@ All changes
1820
* [#347] (https://github.com/docker-java/docker-java/pull/347) Implementation of copy archive to/from container commands
1921
* [#313] (https://github.com/docker-java/docker-java/pull/313) Refactor primitive type fields to be of object type in JSON objects
2022

23+
2.1.4-SNAPSHOT
24+
---
25+
26+
* [#396] (https://github.com/docker-java/docker-java/pull/396) Disable evaluation of http.proxy... variables when using unix socket connection
27+
* [#359] (https://github.com/docker-java/docker-java/pull/359) Fix performance issue of build command by adding bulk-read variant of InputStream.read()
28+
2129
v2.1.3
2230
---
2331
* [#387] (https://github.com/docker-java/docker-java/pull/387) Make ProgressDetails attributes public

src/main/java/com/github/dockerjava/core/dockerfile/Dockerfile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public int read() throws IOException {
147147
}
148148

149149
@Override
150-
public int read(byte[] buff, int offset, int len) throws IOException {
150+
public int read(byte [] buff, int offset, int len) throws IOException {
151151
return tarInputStream.read(buff, offset, len);
152152
}
153153

src/main/java/com/github/dockerjava/jaxrs/DockerCmdExecFactoryImpl.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,23 @@ public void init(DockerClientConfig dockerClientConfig) {
141141
URI originalUri = dockerClientConfig.getUri();
142142

143143
SSLContext sslContext = null;
144+
String protocol = null;
144145

145146
if (dockerClientConfig.getSslConfig() != null) {
146-
configureProxy(clientConfig, "https");
147+
protocol = "https";
147148
try {
148149
sslContext = dockerClientConfig.getSslConfig().getSSLContext();
149150
} catch (Exception ex) {
150151
throw new DockerClientException("Error in SSL Configuration", ex);
151152
}
152153
} else {
153-
configureProxy(clientConfig, "http");
154+
protocol = "http";
155+
}
156+
157+
if(originalUri.getScheme().equals("unix")) {
158+
dockerClientConfig.setUri(UnixConnectionSocketFactory.sanitizeUri(originalUri));
159+
} else {
160+
configureProxy(clientConfig, protocol);
154161
}
155162

156163
PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager(getSchemeRegistry(
@@ -175,12 +182,7 @@ public void init(DockerClientConfig dockerClientConfig) {
175182

176183
client = clientBuilder.build();
177184

178-
if (originalUri.getScheme().equals("unix")) {
179-
dockerClientConfig.setUri(UnixConnectionSocketFactory.sanitizeUri(originalUri));
180-
}
181-
182185
baseResource = client.target(dockerClientConfig.getUri()).path(dockerClientConfig.getVersion().asWebPathPart());
183-
184186
}
185187

186188
private void configureProxy(ClientConfig clientConfig, String protocol) {

0 commit comments

Comments
 (0)