1

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 ?

Alex998
  • 23
  • 3

1 Answers1

0

The Docker registry seems to have issues, at least currently:

https://hub.docker.com/layers/eclipse-temurin/library/eclipse-temurin/8-nanoserver/images/sha256-b6b14b07af4cbe25a542c3671b7171cf02c8bcf5e246b0dcdb4e8a733f495aab?context=explore

https://hub.docker.com/layers/eclipse-temurin/library/eclipse-temurin/8-nanoserver-ltsc2022/images/sha256-11ceaad0c39c7020033244de0b9d97722fabd62ceb3103f7af31c502fe79da53?context=explore

Which means, that HTTP 404 is the response to expect.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
  • Any idea why by creating my spring boot image via Dockerfile the eclipse-temurin nanoserver base image actually succeeds ? – Alex998 Aug 19 '22 at 11:07