Skip to content

Commit d06f8ea

Browse files
authored
Merge pull request #133 from grische/fix/bazel-build
Pin and downgrade Bazel to fix build issues
2 parents b19e147 + ecfcfbc commit d06f8ea

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
FROM python:3.11.7-bullseye AS builder
1+
FROM python:3.11.8-bookworm AS builder
22

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

18-
FROM python:3.11.7-bullseye
18+
19+
FROM python:3.11.8-slim-bookworm
1920
WORKDIR /wgkex
2021

21-
COPY --from=builder /wgkex/bazel /wgkex/
22+
COPY --from=builder /wgkex/bazel-7.0.2 /wgkex/
2223

2324
COPY entrypoint /entrypoint
2425

0 commit comments

Comments
 (0)