proposals/archives/docker_build.md
Implemented in: v0.9.0
Currently, Jib builds and pushes container images to a Docker registry without the need for a Docker daemon. However, for development use cases where the developer does not have a registry set up but do have a Docker daemon available, they may wish to build to the Docker daemon directly.
Building to a Docker daemon should be as simple as calling a new task/goal (jib:buildDocker for Maven and jibBuildDocker for Gradle).
There are three main parts to implementing this proposal:
config.json as the container config, containing:
OS: linuxRootFS.DiffIDS: in-order diff IDs for all the uncompressed layersmanifest.json containing the following fields:
Config: The filename of the container config JSONLayers: in-order list of filenames for each layerdocker load CLI command.Note that currently, build, cache, and push are all in BuildImageSteps. In order to implement parts 2 and 3, these stages would need be modularized so that push can be replaced with build image tarball stream and send to Docker daemon.
If in the future, we would like to not use the docker CLI, we would need to:
docker CLI would.
unix:///var/run/docker.sock or tcp://127.0.0.1:2375.minikube docker-env. These include:
DOCKER_TLS_VERIFYDOCKER_HOSTDOCKER_CERT_PATHDOCKER_API_VERSION