File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
docker-java-core/src/main/java/com/github/dockerjava/core
docker-java/src/test/java/com/github/dockerjava/core Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,11 @@ public InvocationBuilder request() {
7979 resource = "/" + resource ;
8080 }
8181
82+ RemoteApiVersion apiVersion = getDockerClientConfig ().getApiVersion ();
83+ if (apiVersion != RemoteApiVersion .UNKNOWN_VERSION ) {
84+ resource = "/" + apiVersion .asWebPathPart () + resource ;
85+ }
86+
8287 if (!queryParams .isEmpty ()) {
8388 Escaper urlFormParameterEscaper = UrlEscapers .urlFormParameterEscaper ();
8489 resource = queryParams .asMap ().entrySet ().stream ()
Original file line number Diff line number Diff line change @@ -178,6 +178,7 @@ private static DefaultDockerClientConfig config() {
178178
179179 public static DefaultDockerClientConfig config (String password ) {
180180 DefaultDockerClientConfig .Builder builder = DefaultDockerClientConfig .createDefaultConfigBuilder ()
181+ .withApiVersion (RemoteApiVersion .VERSION_1_30 )
181182 .withRegistryUrl ("https://index.docker.io/v1/" );
182183 if (password != null ) {
183184 builder = builder .withRegistryPassword (password );
You can’t perform that action at this time.
0 commit comments