refactor: improve Docker build process for transport binaries#110
refactor: improve Docker build process for transport binaries#110Pratham-Mishra04 merged 1 commit intomainfrom
Conversation
Summary by CodeRabbit
WalkthroughThe Dockerfile for the transport component was updated to change how the Go binary is built. Instead of installing the binary via Changes
Sequence Diagram(s)sequenceDiagram
participant Docker Build
participant Go Module
participant Source Code
Docker Build->>Go Module: go mod init bifrost-build
Docker Build->>Go Module: go get github.com/maximhq/bifrost/transports/...
Docker Build->>Source Code: go build -o /app/main github.com/maximhq/bifrost/transports
Docker Build->>Docker Build: upx /app/main
Docker Build->>Docker Build: Continue with image setup
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches🧪 Generate Unit Tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
# Improve Docker build process for bifrost transports This PR refines the Docker build process for bifrost transports by: - Removing unnecessary GOPATH environment variable and echo statement - Replacing the `go install` approach with a proper module initialization and build process - Creating a local go.mod file with `go mod init bifrost-build` - Using `go build` with output directly to the target location instead of moving binaries after installation - Maintaining the same optimization flags and UPX compression for the final binary These changes provide a cleaner, more explicit build process while maintaining the same functionality.

Improve Docker build process for bifrost transports
This PR refines the Docker build process for bifrost transports by:
go installapproach with a proper module initialization and build processgo mod init bifrost-buildgo buildwith output directly to the target location instead of moving binaries after installationThese changes provide a cleaner, more explicit build process while maintaining the same functionality.