Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
improve local docker build times (#1583)
Will Hutchinsonbdc463e78e4a
diff --git a/justfile b/justfileindex 6383baaff4..d2ab94c892 100644--- a/justfile+++ b/justfile@@ -69,3 +69,16 @@ setup_fusionauth:# Stop FusionAuth containersstop_fusionauth:docker compose -f infra/stacks/fusionauth-instance/docker-compose.yml down++# Clear all BuildKit build cache (full cold rebuild next time)+docker_cache_clear:+ docker builder prune --all -f++# Clear only the Rust target caches (keeps downloaded crates, forces recompilation)+docker_cache_clear_targets:+ docker builder prune --filter type=exec.cachemount --filter id=rust-target-dev-debug -f+ docker builder prune --filter type=exec.cachemount --filter id=rust-target-dev-release -f++# Show BuildKit cache disk usage+docker_cache_usage:+ docker builder du --verbosediff --git a/rust/cloud-storage/Dockerfile.convert_service.dev b/rust/cloud-storage/Dockerfile.convert_service.devindex 9fe4274b0a..92849b2d39 100644--- a/rust/cloud-storage/Dockerfile.convert_service.dev+++ b/rust/cloud-storage/Dockerfile.convert_service.dev@@ -1,3 +1,4 @@+# syntax=docker/dockerfile:1# Download LibreOffice/Collabora Online assetsFROM debian:trixie-slim AS lokRUN apt-get update && apt-get install -y --no-install-recommends \@@ -18,9 +19,12 @@ WORKDIR /appFROM chef AS builderCOPY . .-RUN cargo build --release --bin convert_service \+RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=shared \+ --mount=type=cache,target=/usr/local/cargo/git/db,sharing=shared \+ --mount=type=cache,target=/app/target,id=rust-target-dev-release,sharing=locked \+ cargo build --release --bin convert_service \&& cargo strip \- && mv /app/target/release/convert_service /app/svc+ && cp /app/target/release/convert_service /app/svc# Runtime image with LibreOfficeFROM ubuntu:noble AS convert_servicediff --git a/rust/cloud-storage/Dockerfile.dev b/rust/cloud-storage/Dockerfile.devindex 215f5ff2f9..8b3f0ffcfc 100644--- a/rust/cloud-storage/Dockerfile.dev+++ b/rust/cloud-storage/Dockerfile.dev@@ -1,3 +1,4 @@+# syntax=docker/dockerfile:1FROM rust:latest AS chefENV SQLX_OFFLINE=trueWORKDIR /app@@ -5,17 +6,30 @@ WORKDIR /appFROM chef AS builderCOPY . .-# Build ALL standard service binaries at once-RUN cargo build \- --bin authentication_service \- --bin connection_gateway_service \- --bin contacts_service \- --bin document_cognition_service \- --bin document_storage_service \- --bin email_service \- --bin notification_service \- --bin static_file_service \- --bin unfurl_service+# Build ALL standard service binaries at once (with BuildKit cache mounts for incremental builds)+RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=shared \+ --mount=type=cache,target=/usr/local/cargo/git/db,sharing=shared \+ --mount=type=cache,target=/app/target,id=rust-target-dev-debug,sharing=locked \+ cargo build \+ --bin authentication_service \+ --bin connection_gateway_service \+ --bin contacts_service \+ --bin document_cognition_service \+ --bin document_storage_service \+ --bin email_service \+ --bin notification_service \+ --bin static_file_service \+ --bin unfurl_service \+ && mkdir -p /app/out \+ && cp /app/target/debug/authentication_service /app/out/ \+ && cp /app/target/debug/connection_gateway_service /app/out/ \+ && cp /app/target/debug/contacts_service /app/out/ \+ && cp /app/target/debug/document_cognition_service /app/out/ \+ && cp /app/target/debug/document_storage_service /app/out/ \+ && cp /app/target/debug/email_service /app/out/ \+ && cp /app/target/debug/notification_service /app/out/ \+ && cp /app/target/debug/static_file_service /app/out/ \+ && cp /app/target/debug/unfurl_service /app/out/# Base runtime imageFROM debian:trixie-slim AS base@@ -28,46 +42,46 @@ EXPOSE 8080# Individual service targetsFROM base AS authentication_service-COPY --from=builder /app/target/debug/authentication_service /app/svc+COPY --from=builder /app/out/authentication_service /app/svcRUN chmod +x /app/svcENTRYPOINT ["dumb-init", "./svc"]FROM base AS connection_gateway_service-COPY --from=builder /app/target/debug/connection_gateway_service /app/svc+COPY --from=builder /app/out/connection_gateway_service /app/svcRUN chmod +x /app/svcENTRYPOINT ["dumb-init", "./svc"]FROM base AS contacts_service-COPY --from=builder /app/target/debug/contacts_service /app/svc+COPY --from=builder /app/out/contacts_service /app/svcRUN chmod +x /app/svcENTRYPOINT ["dumb-init", "./svc"]FROM base AS document_cognition_service-COPY --from=builder /app/target/debug/document_cognition_service /app/svc+COPY --from=builder /app/out/document_cognition_service /app/svcRUN chmod +x /app/svcENTRYPOINT ["dumb-init", "./svc"]FROM base AS document_storage_service-COPY --from=builder /app/target/debug/document_storage_service /app/svc+COPY --from=builder /app/out/document_storage_service /app/svcRUN chmod +x /app/svcENTRYPOINT ["dumb-init", "./svc"]FROM base AS email_service-COPY --from=builder /app/target/debug/email_service /app/svc+COPY --from=builder /app/out/email_service /app/svcRUN chmod +x /app/svcENTRYPOINT ["dumb-init", "./svc"]FROM base AS notification_service-COPY --from=builder /app/target/debug/notification_service /app/svc+COPY --from=builder /app/out/notification_service /app/svcRUN chmod +x /app/svcENTRYPOINT ["dumb-init", "./svc"]FROM base AS static_file_service-COPY --from=builder /app/target/debug/static_file_service /app/svc+COPY --from=builder /app/out/static_file_service /app/svcRUN chmod +x /app/svcENTRYPOINT ["dumb-init", "./svc"]FROM base AS unfurl_service-COPY --from=builder /app/target/debug/unfurl_service /app/svc+COPY --from=builder /app/out/unfurl_service /app/svcRUN chmod +x /app/svcENTRYPOINT ["dumb-init", "./svc"]diff --git a/rust/cloud-storage/Dockerfile.search_processing_service.dev b/rust/cloud-storage/Dockerfile.search_processing_service.devindex c90ff7032d..dc2f5473aa 100644--- a/rust/cloud-storage/Dockerfile.search_processing_service.dev+++ b/rust/cloud-storage/Dockerfile.search_processing_service.dev@@ -1,3 +1,4 @@+# syntax=docker/dockerfile:1FROM rust:latest AS chefENV SQLX_OFFLINE=trueRUN cargo install cargo-strip@@ -6,9 +7,12 @@ WORKDIR /appFROM chef AS builderCOPY . .-RUN cargo build --release --bin search_processing_service \+RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=shared \+ --mount=type=cache,target=/usr/local/cargo/git/db,sharing=shared \+ --mount=type=cache,target=/app/target,id=rust-target-dev-release,sharing=locked \+ cargo build --release --bin search_processing_service \&& cargo strip \- && mv /app/target/release/search_processing_service /app/svc+ && cp /app/target/release/search_processing_service /app/svc# Runtime imageFROM debian:trixie-slim AS search_processing_service