From fd25996a0cd7bc8c8fac9a8e975bfff72484fb7d Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Mon, 16 Feb 2026 18:51:24 -0700 Subject: [PATCH] fix: make Docker build self-contained with local context The parent-directory build context was blocked by a sibling project's .dockerignore. Switch to using the repo root as context and pull encryptid-sdk via Docker's additional_contexts feature. Co-Authored-By: Claude Opus 4.6 --- .dockerignore | 6 ++++++ Dockerfile | 6 +++--- docker-compose.yml | 5 +++-- 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4fbff16 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +node_modules +dist +.git +backlog +docs +*.md diff --git a/Dockerfile b/Dockerfile index ced10fd..647c265 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,15 +3,15 @@ FROM oven/bun:1 AS build WORKDIR /app # Copy package files -COPY rspace-online/package.json rspace-online/bun.lockb* ./ +COPY package.json bun.lock* ./ # Copy local SDK dependency (package.json references file:../encryptid-sdk) -COPY encryptid-sdk /encryptid-sdk/ +COPY --from=encryptid-sdk . /encryptid-sdk/ RUN bun install --frozen-lockfile # Copy source -COPY rspace-online/ . +COPY . . # Build frontend RUN bun run build diff --git a/docker-compose.yml b/docker-compose.yml index a4eddc3..94d4aee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,9 @@ services: rspace: build: - context: .. - dockerfile: rspace-online/Dockerfile + context: . + additional_contexts: + encryptid-sdk: ../encryptid-sdk container_name: rspace-online restart: unless-stopped volumes: