Skip to content

Commit 4bab32d

Browse files
committed
fix: unbreak container rebuild functionality
Signed-off-by: Chris Jowett <[email protected]>
1 parent b700911 commit 4bab32d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ RUN apt-get update && \
2626
RUN curl -L -s https://go.dev/dl/go$GO_VERSION.linux-$TARGETARCH.tar.gz | tar -C /usr/local -xz
2727
ENV PATH $PATH:/usr/local/go/bin
2828

29+
# Install grpc compilers
30+
ENV PATH $PATH:/root/go/bin
31+
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && \
32+
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
33+
2934
# Install protobuf (the version in 22.04 is too old)
3035
RUN curl -L -s https://github.com/protocolbuffers/protobuf/releases/download/v26.1/protoc-26.1-linux-x86_64.zip -o protoc.zip && \
3136
unzip -j -d /usr/local/bin protoc.zip bin/protoc && \
@@ -143,11 +148,6 @@ COPY . .
143148
COPY .git .
144149
RUN echo "GO_TAGS: $GO_TAGS"
145150

146-
# Install grpc compilers
147-
ENV PATH $PATH:/root/go/bin
148-
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@latest && \
149-
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
150-
151151
RUN apt-get update && \
152152
apt-get install -y build-essential cmake git && \
153153
apt-get clean && \
@@ -227,7 +227,7 @@ COPY . .
227227
COPY --from=builder /build/sources ./sources/
228228
COPY --from=grpc /build/grpc ./grpc/
229229

230-
RUN cd /build/grpc/cmake/build && make install && rm -rf /build/grpc
230+
RUN make prepare-sources && cd /build/grpc/cmake/build && make install && rm -rf /build/grpc
231231

232232
# Copy the binary
233233
COPY --from=builder /build/local-ai ./

0 commit comments

Comments
 (0)