Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bundle grpc_health_probe in image #387

Merged
2 commits merged into from
Sep 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ RUN apk add --no-cache ca-certificates
# Copy the binary to the production image from the builder stage.
COPY --from=amd64 /src/open-saves/build/collector /collector

RUN GRPC_HEALTH_PROBE_VERSION=v0.4.12 && \
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /bin/grpc_health_probe

CMD ["/collector"]

# Build the server image.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The executable should probably be packaged in both the collector and the server.
For the collector, I would add this section at line 62 and line 78 in the original file, and keep the CMD as the last step.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Expand All @@ -76,5 +80,9 @@ RUN apk add --no-cache ca-certificates
COPY --from=amd64 /src/open-saves/build/server /server
COPY --from=amd64 /src/open-saves/configs /configs

RUN GRPC_HEALTH_PROBE_VERSION=v0.4.12 && \
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
chmod +x /bin/grpc_health_probe

# Run the web service on container startup.
CMD ["/server"]