Skip to content

Commit ecfcfbc

Browse files
committed
Downgrade and pin Bazel to 7.0.2
Version 7.1.0 runs into issues with its sandbox: 2.108 ERROR: Failed to initialize sandbox: /root/.cache/bazel/_bazel_root/20f0ced2adfccd482c7c7a0094d96fba/sandbox/_moved_trash_dir -> /root/.cache/bazel/_bazel_root/20f0ced2adfccd482c7c7a0094d96fba/sandbox/stale-trash-0 (Invalid cross-device link)
1 parent fcc275f commit ecfcfbc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ FROM python:3.11.8-bookworm AS builder
33
RUN apt-get update && apt-get install -y apt-transport-https curl gnupg \
44
&& curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor >/usr/share/keyrings/bazel-archive-keyring.gpg \
55
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/bazel-archive-keyring.gpg] https://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \
6-
&& apt-get update && apt-get install -y bazel \
6+
&& apt-get update && apt-get install -y bazel-7.0.2 \
77
&& rm -rf /var/lib/apt/lists/*
88

99
WORKDIR /wgkex
1010

1111
COPY BUILD WORKSPACE requirements.txt ./
1212
COPY wgkex ./wgkex
1313

14-
RUN ["bazel", "build", "//wgkex/broker:app"]
15-
RUN ["bazel", "build", "//wgkex/worker:app"]
16-
RUN ["cp", "-rL", "bazel-bin", "bazel"]
14+
RUN ["bazel-7.0.2", "build", "//wgkex/broker:app"]
15+
RUN ["bazel-7.0.2", "build", "//wgkex/worker:app"]
16+
RUN ["cp", "-rL", "bazel-bin", "bazel-7.0.2"]
1717

1818

1919
FROM python:3.11.8-slim-bookworm
2020
WORKDIR /wgkex
2121

22-
COPY --from=builder /wgkex/bazel /wgkex/
22+
COPY --from=builder /wgkex/bazel-7.0.2 /wgkex/
2323

2424
COPY entrypoint /entrypoint
2525

0 commit comments

Comments
 (0)