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:
Robert van Diest
2026-03-27 16:21:13 +01:00
parent cba080acfe
commit 4c71a1b4c8
3 changed files with 9 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
services:
backend:
image: randall/backend:latest
build:
context: ../..
dockerfile: cicd/docker/Dockerfile.backend
@@ -20,6 +21,7 @@ services:
start_period: 10s
frontend:
image: randall/frontend:latest
build:
context: ../..
dockerfile: cicd/docker/Dockerfile.frontend