I am trying to containerize and create an image of my spring boot app using Jib. The requirement is that it should run on an windows container thus my base image is eclipse-temurin:8-nanoserver. https://hub.docker.com/r/winamd64/eclipse-temurin/
Whenever I build my image I get the following error:
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.2.1:dockerBuild (push-custom-tag) on project snmp-microservice: com.google.cloud.tools.jib.registry.RegistryErrorException: Tried to pull BLOB for registry-1.docker.io/library/eclipse-temurin with digest sha256:2ebf439f800cd4c1fccaf4a0545e6bff60caa5141295c8ab81f6c525073c423d but failed because: blob unknown to registry (something went wrong): 404 Not Found
[ERROR] {"errors":[{"code":"BLOB_UNKNOWN","message":"blob unknown to registry","detail":"sha256:2ebf439f800cd4c1fccaf4a0545e6bff60caa5141295c8ab81f6c525073c423d"}]}
[ERROR] -> [Help 1]
This is how jib looks in my pom.xml:
<profiles>
<profile>
<id>jib-push-to-local</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>3.2.1</version>
<configuration>
<from>
<image>eclipse-temurin:8-nanoserver</image>
<platforms>
<platform>
<architecture>amd64</architecture>
<os>windows</os>
</platform>
</platforms>
</from>
<container>
<ports>
<port>8080</port>
</ports>
<format>OCI</format>
</container>
</configuration>
<executions>
<execution>
<id>push-custom-tag</id>
<phase>package</phase>
<configuration>
<to>
<image>amb/${app.image.name}:${version}</image>
</to>
</configuration>
<goals>
<goal>dockerBuild</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
I am using docker for windows, docker version shows:
Client:
Version: master-dockerproject-2022-03-26
API version: 1.42
Go version: go1.17.8
Git commit: dd7397342a
Built: Sun Mar 27 00:09:40 2022
OS/Arch: windows/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: master-dockerproject-2022-03-26
API version: 1.42 (minimum version 1.24)
Go version: go1.18
Git commit: 8941dcfcc5
Built: Sun Mar 27 00:05:42 2022
OS/Arch: windows/amd64
Experimental: false
Is worth saying that with jib this happens with any version of eclipse temurin with a base image of windows, I tried to pull windowsservercore and nanoserver and all of their associated versions that eclipse temurin offers but for all I get the same issue, I think maybe Jib doesn't support windows builds. If I create a Dockerfile and I don't use Jib everything works perfectly, however I really want to use Jib. Any ideas what might be the issue ?