File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 context : .
3232 file : ./Dockerfile
3333 push : true
34+ provenance : mode=max
35+ sbom : true
3436 tags : |
3537 docker.io/cartheur/debian-bazel:latest
Original file line number Diff line number Diff line change @@ -23,7 +23,14 @@ RUN curl -fsSL -o /usr/local/bin/bazel \
2323 && chmod +x /usr/local/bin/bazel \
2424 && ln -s /usr/local/bin/bazel /usr/local/bin/bazelisk
2525
26- ENV BAZELISK_HOME=/usr/local/share/bazelisk
26+ RUN groupadd -g 10001 bazel \
27+ && useradd -m -u 10001 -g bazel -s /bin/bash bazel \
28+ && mkdir -p /workspace /home/bazel/.cache/bazelisk \
29+ && chown -R bazel:bazel /workspace /home/bazel
30+
31+ ENV HOME=/home/bazel
32+ ENV BAZELISK_HOME=/home/bazel/.cache/bazelisk
2733WORKDIR /workspace
34+ USER bazel
2835
2936CMD ["bazel" , "--version" ]
Original file line number Diff line number Diff line change 22
33A Debian + Bazel build container for creating distroless-style images without pulling in extra Google project boilerplate.
44
5+ The container runs as a non-root ` bazel ` user by default.
6+
57Use it in a multistage Dockerfile:
68
79``` dockerfile
You can’t perform that action at this time.
0 commit comments