Skip to content

Commit 2a05240

Browse files
author
Terraphim CI
committed
fix(release): exclude firecracker crates from Docker context
- Add firecracker crates to .dockerignore to prevent copying - Remove manual rm -rf commands from Dockerfile - Docker build now respects workspace excludes via .dockerignore
1 parent 9f981b9 commit 2a05240

2 files changed

Lines changed: 9 additions & 10 deletions

File tree

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,9 @@ desktop/package-lock.json
149149
# Keep essential rust configuration
150150
!rust-toolchain.toml
151151
!.github/rust-toolchain.toml
152+
153+
# Exclude crates with private git dependencies (firecracker)
154+
crates/terraphim_rlm/
155+
crates/terraphim_github_runner/
156+
crates/terraphim_github_runner_server/
157+
terraphim_firecracker/

docker/Dockerfile.multiarch

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,25 +113,18 @@ RUN find crates -name Cargo.toml -exec dirname {} \; | while read dir; do \
113113
done && \
114114
mkdir -p terraphim_server/src && echo 'fn main() {}' > "terraphim_server/src/main.rs"
115115

116-
# Remove excluded crates that have private git dependencies
117-
# These are excluded in workspace Cargo.toml but cargo fetch still sees them
118-
RUN rm -rf crates/terraphim_rlm crates/terraphim_github_runner crates/terraphim_github_runner_server 2>/dev/null || true
119-
RUN rm -rf terraphim_firecracker 2>/dev/null || true
120-
121116
# Pre-build dependencies
117+
# Note: crates with private git deps are excluded via .dockerignore
122118
RUN . /root/.profile && \
123119
RUST_TARGET=$(cat /tmp/rust-target) && \
124120
cargo fetch --target=$RUST_TARGET
125121

126-
# Copy source code (excluding crates with private dependencies)
122+
# Copy source code
123+
# Note: crates with private git deps are excluded via .dockerignore
127124
COPY crates ./crates
128125
COPY terraphim_server ./terraphim_server
129126
COPY --from=frontend-builder /app/dist ./terraphim_server/dist
130127

131-
# Remove excluded crates again after copy
132-
RUN rm -rf crates/terraphim_rlm crates/terraphim_github_runner crates/terraphim_github_runner_server 2>/dev/null || true
133-
RUN rm -rf terraphim_firecracker 2>/dev/null || true
134-
135128
# Build the application
136129
RUN . /root/.profile && \
137130
RUST_TARGET=$(cat /tmp/rust-target) && \

0 commit comments

Comments
 (0)