chore(docker): optimize builds and name images
- Add BuildKit cache mounts for NuGet and npm to persist package caches across builds - Skip redundant restore on dotnet publish with --no-restore - Add --prefer-offline to npm ci to prefer cached tarballs - Tag images as randall/backend:latest and randall/frontend:latest via compose image: key Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,8 @@ WORKDIR /app
|
||||
|
||||
# Install dependencies — copy lockfiles first to cache the npm layer
|
||||
COPY src/frontend/package.json src/frontend/package-lock.json ./
|
||||
RUN npm ci
|
||||
RUN --mount=type=cache,id=npm,target=/root/.npm \
|
||||
npm ci --prefer-offline
|
||||
|
||||
# Copy source
|
||||
COPY src/frontend/index.html ./
|
||||
|
||||
Reference in New Issue
Block a user