distroless icon indicating copy to clipboard operation
distroless copied to clipboard

[Question] Understanding how the images are build with bazel

Open lukas2510 opened this issue 11 months ago • 0 comments

Hey, I am trying to understand how the distroless images are being build with bazel. And in the next step I want to adjust the code to build the python images with a new python version. Currently they have python 3.11 and I want to build them with python 3.13 in the images.

I looked at the code and forked the repository trying to build the images on my own. I encountered some questions I didn't find answers for.

  1. Why is there a ~ symbol in the repository label? is this a placeholder and will be replaced with something? https://github.com/GoogleContainerTools/distroless/blob/dca9008b864a381b5ce97196a4d8399ac3c2fa65/private/repos/deb/package.BUILD.tmpl#L5-L6
  2. When I try to run bazel build //... on my local machine I run into the error message: ERROR: /home/user/.cache/bazel/_bazel_user/1f7992ad81ee9cefa6220f093020f63e/external/+java+temurin21_jre_arm64/BUILD.bazel: no such target '@@+java+temurin21_jre_arm64//:temurin21_jre_arm64': target 'temurin21_jre_arm64' not declared in package '' defined by /home/user/.cache/bazel/_bazel_user/1f7992ad81ee9cefa6220f093020f63e/external/+java+temurin21_jre_arm64/BUILD.bazel
  3. Is there a way to build the images locally? and if yes how?

I am new to bazel and would appreciate it if someone could answer my questions and help me to understand how the distroless images get build with bazel

lukas2510 avatar Jan 16 '25 12:01 lukas2510