Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JibDockerBuild fails on download image (manifest) which is only locally available #1761

Closed
lostiniceland opened this issue Jun 4, 2019 · 2 comments

Comments

@lostiniceland
Copy link

Description of the issue:
Using a from-clause with an base-image only available in the local Docker daemon cache, jib still tries to download the image from dockerhub. This, of course, fails

Expected behavior:
jibDockerBuild is able to use the image from the local cache and does not fail on missing metadata from dockerhub.

Steps to reproduce:

  • create local base image
  • use base-image in jib-from

Environment:
OpenSuse Leap 15.1
Gradle 5.4.1

jib-gradle-plugin Configuration: Kotlin-DSL

jib {
	from.image = "open-liberty:webProfile8-java12" // not yet available on dockerhub. locally forked
	to.image = "test/mystuff:openliberty"
	container {
		appRoot = "/opt/ol/wlp/usr/servers/defaultServer/apps/some.war"
		ports = mutableListOf("8080")
	}
	extraDirectories {
		setPaths(mutableListOf(Paths.get(libertyDockerFolder)))
	}
}

Log output:

Execution failed for task ':jibDockerBuild'.
> com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: Tried to pull image manifest for registry-1.docker.io/library/open-liberty:webProfile8-java12 but failed because: manifest unknown | If this is a bug, please file an issue at https://github.com/GoogleContainerTools/jib/issues/new
@lostiniceland lostiniceland changed the title JibDockerBuild tries to download image (manifest) even though it is locally available JibDockerBuild fails on download image (manifest) which is only locally available Jun 4, 2019
@loosebazooka
Copy link
Member

This is not supported in jib right now, but we expect to support it eventually.

@chanseokoh
Copy link
Member

Closing as a dup of #1468.

@lostiniceland you can use the offline mode (--offline) with JibDockerBuild, which will not attempt downloading the manifest of the base image. The offline mode will work provided you ran jibDockerBuild online at least once. However, note that this still won't make use of the Docker cache, so this may not cover your case if the image is only available in your local Docker cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants