Cannot use base image hosted on ghcr
See original GitHub issueEnvironment:
- Jib version: 2.6.0
- Build tool: Gradle
- OS: Linux
Description of the issue:
When using Jib to build an image with a base image hosted on GitHub Container Registry (ghcr.io), it fails with Premature end of Content-Length delimited message body
Expected behavior:
Build should succeed with ghcr.io base image
Steps to reproduce:
- git clone https://github.com/anuraaga/jib-ghcr.git
- cd jib-ghcr
- ./gradlew jibDockerBuild
jib-gradle-plugin
Configuration:
jib {
to {
image = "ghcr.io/anuraaga/foobar"
}
from {
image = "ghcr.io/github/super-linter:v3"
}
container {
mainClass = "Application"
}
}
I have tried with other ghcr images (I originally tried with my own image and switched to github’s example super-linter)
Log output:
Base image 'ghcr.io/github/super-linter:v3' does not use a specific image digest - build may not be reproducible
The base image requires auth. Trying again for ghcr.io/github/super-linter:v3...
Using credentials from Docker config (/Users/aanuraag/.docker/config.json) for ghcr.io/github/super-linter:v3
Using base image with digest: sha256:b5b43c0f80224919968b1482b48d82c2424cf596e09468917025575a6bf110d2
I/O error for image [ghcr.io/github/super-linter]:
org.apache.http.ConnectionClosedException
Premature end of Content-Length delimited message body (expected: 31,167; received: 0)
Additional Information:
The base image works fine with docker pull
or building a Dockerfile
. Jib works fine with images hosted on other container registries. ghcr base images used to work, but stopped working last week or so, presumably due to a change in ghcr. However, since the docker
command works fine, presumably it’s something that can be fixed in jib too. Perhaps it’s time to swap apache HTTP with okhttp.
Also just to make sure it’s not an auth related issue I tried with removing .docker/config.json
and same error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top GitHub Comments
👋 we rolled out a fix for this header about 2 hours ago, you should see it working now. Thanks! 🙇
@clarkbw Thanks for the quick fix! Confirmed it’s working fine now 😃