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 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-16 18:51:24 -07:00
parent 46d8429082
commit fd25996a0c
3 changed files with 12 additions and 5 deletions

6
.dockerignore Normal file
View File

@ -0,0 +1,6 @@
node_modules
dist
.git
backlog
docs
*.md

View File

@ -3,15 +3,15 @@ FROM oven/bun:1 AS build
WORKDIR /app WORKDIR /app
# Copy package files # 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 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 RUN bun install --frozen-lockfile
# Copy source # Copy source
COPY rspace-online/ . COPY . .
# Build frontend # Build frontend
RUN bun run build RUN bun run build

View File

@ -1,8 +1,9 @@
services: services:
rspace: rspace:
build: build:
context: .. context: .
dockerfile: rspace-online/Dockerfile additional_contexts:
encryptid-sdk: ../encryptid-sdk
container_name: rspace-online container_name: rspace-online
restart: unless-stopped restart: unless-stopped
volumes: volumes: