3

I'm running a build pipeline on azure with following mvn docker profile.

                   <plugin>
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <version>0.25.2</version>
                        <configuration>
                         <configuration>
                            <dockerHost>${docker.host}</dockerHost>
                            <images>
                                <image>
                                    <alias>${project.artifactId}</alias>
                                    <name>inst-iot/${project.artifactId}:${project.version}</name>
                                    <build>
                                        <from>java:8-jdk-alpine</from>
                                        <assembly>
                                            <descriptorRef>artifact</descriptorRef>
                                        </assembly>
                                        <ports>
                                            <port>80</port>
                                        </ports>
                                        <env>
                                            <SERVER_PORT>80</SERVER_PORT>
                                            <JAVA_OPTS>-Xmx2048m</JAVA_OPTS>
                                        </env>
                                        <cmd>
                                            <shell>java $JAVA_OPTS -jar
                                                /maven/${project.name}-${project.version}.jar
                                                --spring.profiles.active=docker</shell>
                                        </cmd>
                                        <tags>
                                            <tag>latest</tag>
                                            <tag>${project.version}</tag>
                                        </tags>
                                    </build>
                                </image>
                            </images>
                        </configuration>

When this runs on Hosted Windows 2019 with VS2019 agent pool it throws an error as follows,

[ERROR] DOCKER> Unable to check image [openjdk:8] : client version 1.18 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version (Bad Request: 400) [client version 1.18 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version (Bad Request: 400)]

I think this is related to a Docker version on agent machine. How can I resolve this issue?

Channa
  • 3,267
  • 7
  • 41
  • 67

2 Answers2

1

This can be resolved by changing the docker-maven-plugin version to 0.30.0 as well

Channa
  • 3,267
  • 7
  • 41
  • 67
0

Looking at the current OpenJDK image for Alpine, the supported JDK (for Alpine) image tags are these:

Tags: 13-ea-19-jdk-alpine3.9, 13-ea-19-alpine3.9, 13-ea-jdk-alpine3.9, 13-ea-alpine3.9, 13-jdk-alpine3.9, 13-alpine3.9, 13-ea-19-jdk-alpine, 13-ea-19-alpine, 13-ea-jdk-alpine, 13-ea-alpine, 13-jdk-alpine, 13-alpine

This list is taken from: https://github.com/docker-library/official-images/blob/8d9c213e6129df5858a85c8368515d90e737c1f8/library/openjdk#L13

And the image 8-jdk-alpine is not available anymore, as it will not be supported.

Therefore you should use tag of 13-jdk-alpine, and the complete tag is openjdk:13-jdk-alpine.

Eriawan Kusumawardhono
  • 4,796
  • 4
  • 46
  • 49