snowdrop / java-buildpack-client

A simple buildpack (https://buildpacks.io/) platform implementation as a library for java..
Apache License 2.0
14 stars 7 forks source link

Registry mode #47

Closed BarDweller closed 1 year ago

BarDweller commented 1 year ago

Adds ability to build images without the docker daemon flag. This means the docker socket is not mounted into the build container, and the resulting image must be pulled back from the registry if required to be used locally.

To use registry mode, just set withUseDaemon(false) and withFinalImageName("registry:port/thing/name:tag")

(note if, like me, you are using a local docker registry at 'localhost:5000' then you need to also use withDockerNetwork("host") because otherwise 'localhost' inside the the container running the build, will mean something different than the 'localhost' where you are running the registry)

Docker authentication will be addressed separately. Most likely by exposing the DockerClient object from the underlying docker api.

resolves 6