https://pantsbuild.org/ logo
#general
Title
# general
b

bright-pilot-85305

11/20/2022, 9:58 PM
At my company we use Gitlab CI that's backed by a kubernetes cluster. I believe
docker build
wont be able to build in this environment (we use kaniko). Doe pants have a way of building stuff without docker build or is it just incompatible with kubernetes? If it's the latter, is there a plan to be able to build on kubernetes and if so how close is that to fruition?
c

curved-television-6568

11/20/2022, 11:24 PM
Does not currently work. There are a couple issues on this topic, but none with progress that I’m aware of.
👍 1
b

bright-pilot-85305

11/20/2022, 11:31 PM
Thanks.
b

bitter-ability-32190

11/21/2022, 2:43 AM
There was a docker less docker build in pants v1 I'm told
That's also how Bazel does it. So I wouldn't be surprised if that crops up in a year or so for pants
g

gorgeous-winter-99296

11/21/2022, 9:20 AM
I've got a very early backend for OCI images here: https://tgolsson.github.io/pants-backends/oci-readme.html. It's only covering my own use-cases so far, which is one pex or binary -> OCI image -> kubernetes. Focus is on reproducible builds and stable SHAs. It should work OOTB for rootless (and obviously docker-less) builds. It's of course a big change in how you work if you're Dockerfile-based - but it's there if you want to try it.
c

curved-television-6568

11/21/2022, 12:16 PM
@powerful-umbrella-75231☝️
b

bitter-ability-32190

11/21/2022, 3:51 PM
CC @dry-analyst-73584 as well ☝️
d

dry-analyst-73584

11/21/2022, 3:55 PM
Yeah, I wrote a series of tasks for pants V1 to build OCI images directly without the use of docker. I’ve been thinking about porting it to V2. It starts with defining a base docker image in your BUILD file, and then pants builds one layer per pants task/rule.
As Tom did - I was focused on reproducibility and stable sha’s for caching.
b

bright-pilot-85305

11/21/2022, 3:56 PM
Why not depend on one of the existing tools like Buildah or Kaniko or etc. instead of rolling your own?
g

gorgeous-winter-99296

11/21/2022, 3:57 PM
I can't speak for Tansy's implementation, but mine is a wrapper around Umoci 🙂
FWIW choosing umoci was purely based on it having available static binaries. Buildah doesn't. Podman has some but it's inconsistent. (Kaniko seems to have the same issue.)
👍 1
d

dry-analyst-73584

11/21/2022, 4:21 PM
I wrote mine in… 2017? And I was unaware of any alternative tooling at the time
1
7 Views