Skip to content

Cache Next.js artifacts in Docker builds - #12

Merged
mvallebr merged 1 commit into
mainfrom
codex/next-docker-cache
Sep 20, 2026
Merged

mvallebr merged 1 commit into
mainfrom
codex/next-docker-cache

Conversation

@mvallebr

Copy link
Copy Markdown
Contributor

Problem

The production image compiles Next.js inside the Docker builder without a persistent incremental build cache.

Changes

  • Mount /app/.next/cache during the Next.js build stage.

Scope

The cache is local to the remote BuildKit worker and is subject to its GC/restarts. It does not change the final image.

Validation

  • docker buildx build --call=targets .
  • git diff --check

@mvallebr
mvallebr merged commit 88a70da into main Sep 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant