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

JIB mode: Loading tar into docker daemon fails #1385

Closed
calohmn opened this issue Sep 30, 2020 · 1 comment · Fixed by #1386
Closed

JIB mode: Loading tar into docker daemon fails #1385

calohmn opened this issue Sep 30, 2020 · 1 comment · Fixed by #1386
Milestone

Comments

@calohmn
Copy link

calohmn commented Sep 30, 2020

Description

Tested with the Spring Boot Sample with JIB Build Mode:
When adapting the pom of the 'spring-boot-with-jib' sample to use d-m-p 0.34.0 the tar file can be successfully built and loaded into docker with docker load -i <tar-file>, as described in the README of the sample.

But when adapting the pom to use 0.34-SNAPSHOT, having built d-m-p with the org.apache.httpcomponents:httpclient dependency updated to 4.5.10 (as fix for the JIB build errors, see #1384), the successfully built tar file can't be loaded into docker.
docker load -i <tar-file> returns an error:

$ docker load -i target/docker/fabric8/spring-boot-dmp-sample-jib/tmp/docker-build.tar
open /var/lib/docker/tmp/docker-import-222751535/blobs/json: no such file or directory

So, this issue seems to have been introduced with d-m-p 0.34.1.

Info

  • d-m-p version : 0.34.1 with org.apache.httpcomponents:httpclient:4.5.10
  • Maven version (mvn -v) : 3.6.0
  • Docker version : 19.03.13
@calohmn
Copy link
Author

calohmn commented Oct 1, 2020

The tar file created with d-m-p 0.34.1 seems to contain the image in the OCI format, which doesn't seem to be supported by "docker load".

$ tar -tf docker-build_0.34.1.tar 
blobs/sha256/ac9208207adaac3a48e54a4dc6b49c69e78c3072d2b3add7efdabf814db2133b
[..]
blobs/sha256/a39549ca9d408834b9455a34a3987ac81e081018e356a98dd4e24223298463a2
oci-layout
index.json

For comparison, the contents of the tar file created with 0.34.0:

$ tar -tf docker-build_0.34.0.tar 
ac9208207adaac3a48e54a4dc6b49c69e78c3072d2b3add7efdabf814db2133b.tar.gz
[..]
501a9945a7a251c815ac795d4c8601299e34f5fcee089528d3fc74c6e9b12b52.tar.gz
config.json
manifest.json

rohanKanojia added a commit to rohanKanojia/docker-maven-plugin that referenced this issue Oct 2, 2020
…thodEror

+ Updating jib-core to 0.15.0 broke our current JIB support due to
  incompatibility with httpclient. Updated apache httpclient to 4.5.10
+ Somehow behavior of Jib setting ImageFormat has been changed(maybe it was
  not working earlier. Introduced a new parameter in mojo `docker.build.jib.imageFormat`
  to allow users specify image format(OCI or Docker) with Docker as
  default ImageFormat.
+ Minor Cleanup in Integration tests; Added an integration test for JIB mode
  which builds image tarball and verifies it by loading into docker daemon

This should also fix fabric8io#1385
rohanKanojia added a commit to rohanKanojia/docker-maven-plugin that referenced this issue Oct 2, 2020
…thodEror

+ Updating jib-core to 0.15.0 broke our current JIB support due to
  incompatibility with httpclient. Updated apache httpclient to 4.5.10
+ Somehow behavior of Jib setting ImageFormat has been changed(maybe it was
  not working earlier. Introduced a new parameter in mojo `docker.build.jib.imageFormat`
  to allow users specify image format(OCI or Docker) with Docker as
  default ImageFormat.
+ Minor Cleanup in Integration tests; Added an integration test for JIB mode
  which builds image tarball and verifies it by loading into docker daemon

This should also fix fabric8io#1385
rohanKanojia added a commit to rohanKanojia/docker-maven-plugin that referenced this issue Oct 2, 2020
…thodEror

+ Updating jib-core to 0.15.0 broke our current JIB support due to
  incompatibility with httpclient. Updated apache httpclient to 4.5.10
+ Somehow behavior of Jib setting ImageFormat has been changed(maybe it was
  not working earlier. Introduced a new parameter in mojo `docker.build.jib.imageFormat`
  to allow users specify image format(OCI or Docker) with Docker as
  default ImageFormat.
+ Minor Cleanup in Integration tests; Added an integration test for JIB mode
  which builds image tarball and verifies it by loading into docker daemon

This should also fix fabric8io#1385
rohanKanojia added a commit to rohanKanojia/docker-maven-plugin that referenced this issue Oct 2, 2020
…thodEror

+ Updating jib-core to 0.15.0 broke our current JIB support due to
  incompatibility with httpclient. Updated apache httpclient to 4.5.10
+ Somehow behavior of Jib setting ImageFormat has been changed(maybe it was
  not working earlier. Introduced a new parameter in mojo `docker.build.jib.imageFormat`
  to allow users specify image format(OCI or Docker) with Docker as
  default ImageFormat.
+ Minor Cleanup in Integration tests; Added an integration test for JIB mode
  which builds image tarball and verifies it by loading into docker daemon

This should also fix fabric8io#1385
rohanKanojia added a commit to rohanKanojia/docker-maven-plugin that referenced this issue Oct 2, 2020
…thodEror

+ Updating jib-core to 0.15.0 broke our current JIB support due to
  incompatibility with httpclient. Updated apache httpclient to 4.5.10
+ Somehow behavior of Jib setting ImageFormat has been changed(maybe it was
  not working earlier. Introduced a new parameter in mojo `docker.build.jib.imageFormat`
  to allow users specify image format(OCI or Docker) with Docker as
  default ImageFormat.
+ Minor Cleanup in Integration tests; Added an integration test for JIB mode
  which builds image tarball and verifies it by loading into docker daemon

This should also fix fabric8io#1385
rohanKanojia added a commit to rohanKanojia/docker-maven-plugin that referenced this issue Oct 2, 2020
…thodEror

+ Updating jib-core to 0.15.0 broke our current JIB support due to
  incompatibility with httpclient. Updated apache httpclient to 4.5.10
+ Somehow behavior of Jib setting ImageFormat has been changed(maybe it was
  not working earlier. Introduced a new parameter in mojo `docker.build.jib.imageFormat`
  to allow users specify image format(OCI or Docker) with Docker as
  default ImageFormat.
+ Minor Cleanup in Integration tests; Added an integration test for JIB mode
  which builds image tarball and verifies it by loading into docker daemon

This should also fix fabric8io#1385
rhuss added a commit that referenced this issue Oct 10, 2020
…1386)

+ Updating jib-core to 0.15.0 broke our current JIB support due to
  incompatibility with httpclient. Updated apache httpclient to 4.5.10
+ Somehow behavior of Jib setting ImageFormat has been changed(maybe it was
  not working earlier. Introduced a new parameter in mojo `docker.build.jib.imageFormat`
  to allow users specify image format(OCI or Docker) with Docker as
  default ImageFormat.
+ Minor Cleanup in Integration tests; Added an integration test for JIB mode
  which builds image tarball and verifies it by loading into docker daemon

This should also fix #1385

Co-authored-by: Roland Huß <roland@ro14nd.de>
@rohanKanojia rohanKanojia added this to the 0.35.0 milestone Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants