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

Unify build tasks by supporting Skopeo URL schemes #1664

Closed
hendrikhalkow opened this issue Apr 23, 2019 · 4 comments
Closed

Unify build tasks by supporting Skopeo URL schemes #1664

hendrikhalkow opened this issue Apr 23, 2019 · 4 comments

Comments

@hendrikhalkow
Copy link

hendrikhalkow commented Apr 23, 2019

I'd like to propose an alternative approach on how to specify what the jib-gradle-plugin and the jib-maven-plugin output during build. Instead of having three different tasks, jib, jibDockerBuild and jibBuildTar, Jib could use the URL scheme that is currently being used at Skopeo, Podman and Buildah.

Instead of using different tasks, the build target would be specified within the build.gradle or pom.xml file. Builds would be always executed via gradle jib or the corresponding Maven command.

To build to a remote registry, you would use jib.to.image="docker://docker.io/foo/bar:latest", for a Docker archive it would be like jib.to.image="docker-archive:myimage.tar", for Docker Daemon builds it would be jib.to.image="docker-daemon:foo/bar:latest".

To specify the another target, you could provide the target via command line:

gradle jib -Pjib.to.image=oci-archive:myimage.tar

Pro:

  • Just one task instead of three
  • Use the same tasks, jib, regardless whether you build to a registry, file or daemon
  • Unification with other container-related build tools
  • More flexibility – you can do things you couldn't do before. How about jib.from.image="oci-archive:baseimage.tar"?

Con:

  • Would cause a breaking change as this is incompatible with the current scheme
  • Addressing isn't standardized yet

What do you think about this?

@hendrikhalkow hendrikhalkow changed the title Unify jib, jibBuildTar and jibDockerBuild by supporting Skopeo URL schemes Unify build tasks by supporting Skopeo URL schemes Apr 23, 2019
@sluongng
Copy link

This is an awesome proposal as I too am looking at options on how to make JIB works with a podman (no docker) machine locally (no registry)

Hope it gets more attention.

@lfarkas
Copy link

lfarkas commented Nov 4, 2019

+1

@OneCricketeer
Copy link
Contributor

Addressing isn't standardized yet

https://github.com/opencontainers/image-spec

@JoeWang1127
Copy link

close as not planned

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

No branches or pull requests

7 participants