Commit 28442b5c authored by Andy Wilkinson's avatar Andy Wilkinson

Lower the minimum required Docker API version to 1.24

Closes gh-19945
parent 54b3f480
......@@ -49,6 +49,8 @@ import org.springframework.util.StringUtils;
public class DockerApi {
private static final List<String> FORCE_PARAMS = Collections.unmodifiableList(Arrays.asList("force", "1"));
static final String API_VERSION = "v1.24";
private final Http http;
......@@ -94,7 +96,7 @@ public class DockerApi {
private URI buildUrl(String path, String... params) {
try {
URIBuilder builder = new URIBuilder("docker://localhost/v1.40" + path);
URIBuilder builder = new URIBuilder("docker://localhost/" + API_VERSION + path);
int param = 0;
while (param < params.length) {
builder.addParameter(params[param++], params[param++]);
......
......@@ -64,7 +64,7 @@ import static org.mockito.Mockito.verify;
*/
class DockerApiTests {
private static final String API_URL = "docker://localhost/v1.40";
private static final String API_URL = "docker://localhost/" + DockerApi.API_VERSION;
private static final String IMAGES_URL = API_URL + "/images";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment