-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3731fb
commit b8bc1ce
Showing
2 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
FROM golang:bookworm as builder | ||
WORKDIR /build-dir | ||
RUN apt-get update && apt-get install -y make git bash protobuf-compiler | ||
RUN apt-get update && apt-get install -y make git bash protobuf-compiler unzip curl | ||
|
||
# Install a specific version of protoc | ||
RUN curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v28.2/protoc-28.2-linux-x86_64.zip && \ | ||
unzip protoc-28.2-linux-x86_64.zip -d /usr/local/ && \ | ||
rm protoc-28.2-linux-x86_64.zip && \ | ||
chmod +x /usr/local/bin/protoc | ||
|
||
# Set the PATH to include Go binaries | ||
ENV PATH=$PATH:/root/go/bin | ||
|
@@ -15,7 +21,7 @@ RUN go mod download | |
|
||
# Install protoc Go plugins | ||
RUN go install google.golang.org/protobuf/cmd/[email protected] | ||
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0 | ||
RUN go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1 | ||
|
||
ENV GOCACHE=/root/.cache/go-build | ||
|
||
|
@@ -28,13 +34,14 @@ RUN --mount=type=cache,target="/root/.cache/go-build" make proto | |
# Build the Go binaries | ||
RUN --mount=type=cache,target="/root/.cache/go-build" make build | ||
|
||
FROM debian:bookworm-slim as logservice | ||
WORKDIR /app | ||
COPY --from=builder /build-dir/go/bin/logservice . | ||
CMD ["./logservice"] | ||
|
||
FROM debian:bookworm-slim as sysdb | ||
COPY --from=builder /build-dir/go/bin/coordinator . | ||
ENV PATH=$PATH:./ | ||
CMD /bin/bash | ||
|
||
|
||
FROM debian:bookworm-slim as logservice | ||
WORKDIR /app | ||
COPY --from=builder /build-dir/go/bin/logservice . | ||
CMD ["./logservice"] |