-
Notifications
You must be signed in to change notification settings - Fork 4
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
1db0413
commit c07936b
Showing
2 changed files
with
32 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM developwithzt/esd-buf-healthprobe-base:general-1.0 as proto-base | ||
COPY buf.* . | ||
COPY protos/ protos/ | ||
RUN buf generate | ||
|
||
FROM ruby:3.3.0-slim as builder | ||
WORKDIR /app | ||
COPY Gemfile Gemfile.lock ./ | ||
RUN bundle install && \ | ||
rm -rf /usr/local/bundle/cache/*.gem && \ | ||
find /usr/local/bundle/gems/ -name "*.c" -delete && \ | ||
find /usr/local/bundle/gems/ -name "*.o" -delete | ||
|
||
FROM ruby:3.3.0-slim | ||
WORKDIR /app | ||
COPY --from=builder /usr/local/bundle/ /usr/local/bundle/ | ||
COPY --from=builder /app/Gemfile* /app/Gemfile* | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends curl && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Download and install the gRPC health probe compatible with ARM64 architecture | ||
RUN GRPC_HEALTH_PROBE_VERSION=v0.4.13 && \ | ||
curl -sLo /bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-arm64 && \ | ||
chmod +x /bin/grpc_health_probe | ||
|
||
COPY --from=proto-base /app/pb/ /app/pb/ | ||
COPY src/ src/ | ||
CMD ["ruby", "src/server.rb"] |