flashbots / mev-boost-relay

MEV-Boost Relay for Ethereum proposer/builder separation (PBS)
https://boost-relay.flashbots.net
GNU Affero General Public License v3.0
422 stars 119 forks source link

Docker optimisation #647

Closed MrKoberman closed 3 months ago

MrKoberman commented 3 months ago

Is this still needed

RUN apk add --no-cache libstdc++ libc6-compat

If we modify the build (copied most from go-ethereum)

RUN --mount=type=cache,target=/root/.cache/go-build GOOS=linux go build -trimpath -ldflags "-s -X cmd.Version=$VERSION -X main.Version=$VERSION -extldflags '-Wl,-z--build-id=none,--strip-all -static'" -tags "ososusergo,netgo,ckzg" -v -o mev-boost-relay .

mev-boost-relay is build with flags that produce a binary that has static links to external resources and would be build as part of the mev-boost-relay binary.