Feature Request - build to docker without docker binary
See original GitHub issueDescription of the issue: The docker build requires docker CLI to load the image built by jib to the docker daemon. It would be great if you could remove this dependency by implementing a simple HTTP post of the tarball to a configurable target. Example with curl:
curl --unix-socket /var/run/docker.sock --header "Content-Type: application/x-tar" --data-binary "@target/jib-image.tar" http://localhost/images/load
So far the communication flavours that I am aware of are:
- HTTP via unix socket (example above)
- HTTP via TCP
- HTTPS via TCP
- HTTP via windows named pipe
Expected behavior: Being able to build to docker without a docker binary installed.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Building containers without Docker - Alex Ellis' Blog
In this post I'll outline several ways to build containers without the need for Docker itself including buildkit, kaniko, GitHub Actions, ...
Read more >Install Docker Engine from binaries
This page contains information on how to install Docker using binaries. These instructions are mostly suitable for testing purposes. We do not recommend ......
Read more >Run the Docker daemon as a non-root user (Rootless mode)
Rootless mode allows running the Docker daemon and containers as a non-root user to mitigate potential vulnerabilities in the daemon and the container...
Read more >Build your Go image - Docker Documentation
Learn how to build your first Docker image by writing a Dockerfile. ... To avoid losing focus on Docker's features, the sample application...
Read more >Overview of Docker Build - Docker Documentation
Docker Build is way more than a simple build command and is not only about packaging your code, it's a whole ecosystem of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
I will be taking care of this implementation. I would like to discuss the following approach
com.github.docker-java:docker-java-transport-zerodep
to deal with the communication and do not reinvent the wheelDockerClient
into an interface with 4 method signaturesmode
,save
,load
andinspect
and create aDefaultDockerClient
which is mostly the existingDockerClient
but implementing itDockerClient
callSocketDockerClient
???DefaultDockerClient
andSocketDockerClient
via SPImode
forgradle
,maven
where options aredefault
orsocket
. support forjib-cli
can be added later.This option allows to ship jib with both supports. It also enables to add new dependency to the plugin in maven and gradle and add the custom implementation via SPI. I was also looking at the plugin framework but doesn’t seem to resolve this part and adding support for it can be a big one.
Looking forward to hear from you.
right, no docker installation is required. It talks directly to the daemon that it is configured.
yes, by
cli
I meant jib cli 😄It makes sense to me. Thanks for the feedback! I just wanted to make it explicitly for the user instead of make it work under the hood with not much aware but given the parameters that are needed we can implement what was suggested.
yes
this sounds a great approach