fix: improve orion/orion-server dev builds#2047
Conversation
benjamin-747
commented
Apr 8, 2026
- Make orion compile on macOS by gating scorpiofs/Linux-only Antares code
- Make orion compile on macOS by gating scorpiofs/Linux-only Antares code
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8b31254f2a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| RUN cargo build -p orion-server --release | ||
| RUN --mount=type=cache,target=/usr/local/cargo/registry \ | ||
| --mount=type=cache,target=/usr/local/cargo/git \ | ||
| --mount=type=cache,target=/app/target \ |
There was a problem hiding this comment.
Persist build artifact outside cache mount
The cargo build step writes /app/target into a BuildKit type=cache mount, which is not part of the committed image filesystem after the RUN completes. That means the later COPY --from=builder /app/target/release/orion-server ... can fail on clean builders because the binary is not present in the stage snapshot. Keep dependency caches mounted, but write/copy the final binary to a non-mounted path before the step ends.
Useful? React with 👍 / 👎.