Skip to content

Commit

Permalink
Adjust the versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitcpbot committed Dec 13, 2024
1 parent a3731fb commit b8bc1ce
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .github/actions/go/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ runs:
run: |
sudo apt-get update
sudo apt-get install -y wget unzip
wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip
sudo unzip protoc-21.12-linux-x86_64.zip -d /usr/local/
sudo rm protoc-21.12-linux-x86_64.zip
wget https://github.com/protocolbuffers/protobuf/releases/download/v28.2/protoc-28.2-linux-x86_64.zip
sudo unzip protoc-28.2-linux-x86_64.zip -d /usr/local/
sudo rm protoc-28.2-linux-x86_64.zip
shell: bash

- name: Add Go bin to PATH
Expand All @@ -31,7 +31,7 @@ runs:

- name: Install protoc-gen-go-grpc
run: |
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2.0
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1
shell: bash

- name: Add Go bin to PATH
Expand Down
19 changes: 13 additions & 6 deletions go/Dockerfile
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
Expand All @@ -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

Expand All @@ -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"]

0 comments on commit b8bc1ce

Please sign in to comment.