[PR #500] [MERGED] fix(container): Avoid recursive app chown layers #4643

Closed
opened 2026-10-22 04:09:25 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/500
Author: @coxde
Created: 5/7/2026
Status: ✅ Merged
Merged: 5/7/2026
Merged by: @coxde

Base: main ← Head: fix/container-data-chown-layer


📝 Commits (1)

  • 14c5da1 fix(container): Avoid recursive app chown layers

📊 Changes

2 files changed (+2 additions, -2 deletions)

View changed files

📝 Dockerfile (+1 -1)
📝 Dockerfile.lite (+1 -1)

📄 Description

Why

The current regular and lite container images recursively chown /app after node_modules and build artifacts are copied. Docker/Podman records that ownership rewrite as a large additional layer, inflating the published image sizes without adding runtime content.

What

  • Limit build-time ownership changes in Dockerfile to /app/data.
  • Limit build-time ownership changes in Dockerfile.lite to /app/data.
  • Keep the writable data directory owned by the runtime user without rewriting the whole /app tree.

Validation

  • Built and ran the lite image locally.
  • Inspected the resulting image history: the data ownership layer is 2.05 kB instead of the previous 599 MB recursive chown layer.

Summary by CodeRabbit

Chores

  • Refined Docker container runtime configurations in both production and lightweight image variants. Data directory file ownership is now managed with targeted precision, applying ownership changes to specific directories rather than recursively across the entire application folder, improving operational efficiency and security boundaries.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/500 **Author:** [@coxde](https://github.com/coxde) **Created:** 5/7/2026 **Status:** ✅ Merged **Merged:** 5/7/2026 **Merged by:** [@coxde](https://github.com/coxde) **Base:** `main` ← **Head:** `fix/container-data-chown-layer` --- ### 📝 Commits (1) - [`14c5da1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/14c5da1896603ddd0962544104137434df0c9f0d) fix(container): Avoid recursive app chown layers ### 📊 Changes **2 files changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+1 -1) 📝 `Dockerfile.lite` (+1 -1) </details> ### 📄 Description ## Why The current regular and lite container images recursively `chown` `/app` after `node_modules` and build artifacts are copied. Docker/Podman records that ownership rewrite as a large additional layer, inflating the published image sizes without adding runtime content. ## What - Limit build-time ownership changes in `Dockerfile` to `/app/data`. - Limit build-time ownership changes in `Dockerfile.lite` to `/app/data`. - Keep the writable data directory owned by the runtime user without rewriting the whole `/app` tree. ## Validation - [x] Built and ran the lite image locally. - [x] Inspected the resulting image history: the data ownership layer is `2.05 kB` instead of the previous `599 MB` recursive chown layer. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Chores - Refined Docker container runtime configurations in both production and lightweight image variants. Data directory file ownership is now managed with targeted precision, applying ownership changes to specific directories rather than recursively across the entire application folder, improving operational efficiency and security boundaries. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:09:25 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4643
No description provided.