You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gravitino.apache.org by "roryqi (via GitHub)" <gi...@apache.org> on 2026/06/09 11:45:31 UTC

[PR] [#11532] fix(docker): avoid duplicate image layer from recursive chmod [gravitino]

roryqi opened a new pull request, #11533:
URL: https://github.com/apache/gravitino/pull/11533

   ### What changes were proposed in this pull request?
   
   Replace the post-COPY `RUN chmod -R g+rwX <dir>` step with `COPY --chmod=775` in three Dockerfiles:
   - `dev/docker/gravitino/Dockerfile`
   - `dev/docker/iceberg-rest-server/Dockerfile`
   - `dev/docker/lance-rest-server/Dockerfile`
   
   ### Why are the changes needed?
   
   `chmod -R` after `COPY` rewrites the mode of every file. With OverlayFS each modified file is copied up into the `RUN` layer, so the whole application tree (~1.9GB for the gravitino image) is stored twice, roughly doubling the image size. `COPY --chmod` sets the mode as the files are written, so there is only one copy.
   
   Measured on the gravitino image (`docker history`):
   
   | layer | before | after |
   |-------|--------|-------|
   | COPY app tree | 1.89 GB | 1.89 GB |
   | permission step | `chmod -R` = **1.89 GB** | `chmod +x`+`useradd` = **369 kB** |
   
   Fix: #11532
   
   ### Does this PR introduce _any_ user-facing change?
   
   No API change. Published Docker images are ~1.9GB smaller. Note: files are now mode 775 instead of the previous `g+rwX` (which preserved existing execute bits); this only adds the execute bit to regular files and does not affect runtime behavior.
   
   ### How was this patch tested?
   
   Built the fixed image and verified with `docker history` that the duplicate ~1.9GB chmod layer is gone (replaced by a 369kB permission layer). Ran the image as the non-root user (uid 1000): the server starts and serves the Gravitino REST (`/api/version`, metalake CRUD), Iceberg REST (`/iceberg/v1/config`) and Lance REST endpoints successfully.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#11532] fix(docker): avoid duplicate image layer from recursive chmod [gravitino]

Posted by "danhuawang (via GitHub)" <gi...@apache.org>.
danhuawang commented on PR #11533:
URL: https://github.com/apache/gravitino/pull/11533#issuecomment-4667238402

   LGTM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#11532] fix(docker): avoid duplicate image layer from recursive chmod [gravitino]

Posted by "roryqi (via GitHub)" <gi...@apache.org>.
roryqi commented on PR #11533:
URL: https://github.com/apache/gravitino/pull/11533#issuecomment-4659416754

   @danhuawang Could u help me review this pull request?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#11532] fix(docker): avoid duplicate image layer from recursive chmod [gravitino]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #11533:
URL: https://github.com/apache/gravitino/pull/11533#issuecomment-4660252901

   <!-- coverage-report -->
   ### Code Coverage Report
   |Overall Project|67.07% **`+0.04%`**|:green_circle:|
   |:-|:-|:-:|
   |Files changed|71.1%|:green_circle:|
   <br>
   
   |Module|Coverage||
   |:-|:-|:-:|
   |aliyun|1.72%|:red_circle:|
   |api|46.8%|:green_circle:|
   |authorization-common|85.96%|:green_circle:|
   |aws|3.66%|:red_circle:|
   |azure|2.47%|:red_circle:|
   |catalog-common|10.4%|:red_circle:|
   |catalog-fileset|80.35%|:green_circle:|
   |catalog-glue|67.41%|:green_circle:|
   |catalog-hive|79.35%|:green_circle:|
   |catalog-jdbc-clickhouse|80.02%|:green_circle:|
   |catalog-jdbc-common|45.31%|:green_circle:|
   |catalog-jdbc-doris|80.28%|:green_circle:|
   |catalog-jdbc-hologres|54.03%|:green_circle:|
   |catalog-jdbc-mysql|79.23%|:green_circle:|
   |catalog-jdbc-oceanbase|78.38%|:green_circle:|
   |catalog-jdbc-postgresql|82.29%|:green_circle:|
   |catalog-jdbc-starrocks|78.51%|:green_circle:|
   |catalog-kafka|77.01%|:green_circle:|
   |catalog-lakehouse-generic|58.53%|:green_circle:|
   |catalog-lakehouse-hudi|79.1%|:green_circle:|
   |catalog-lakehouse-iceberg|85.86%|:green_circle:|
   |catalog-lakehouse-paimon|79.29%|:green_circle:|
   |catalog-model|77.72%|:green_circle:|
   |cli|44.51%|:green_circle:|
   |client-java|77.91%|:green_circle:|
   |common|50.17%|:green_circle:|
   |core|82.51% **`-0.33%`**|:green_circle:|
   |filesystem-hadoop3|76.97% **`-0.69%`**|:green_circle:|
   |flink|0.0%|:red_circle:|
   |flink-common|47.15%|:green_circle:|
   |flink-runtime|0.0%|:red_circle:|
   |gcp|14.12%|:red_circle:|
   |hadoop-common|10.39%|:red_circle:|
   |hive-metastore-common|53.9%|:green_circle:|
   |iceberg-common|57.41%|:green_circle:|
   |iceberg-rest-server|73.8%|:green_circle:|
   |idp-basic|86.18%|:green_circle:|
   |integration-test-common|0.0%|:red_circle:|
   |jobs|66.17%|:green_circle:|
   |lance-common|20.81%|:red_circle:|
   |lance-rest-server|60.54%|:green_circle:|
   |lineage|53.02%|:green_circle:|
   |optimizer|82.95%|:green_circle:|
   |optimizer-api|21.95%|:red_circle:|
   |server|85.73%|:green_circle:|
   |server-common|73.28%|:green_circle:|
   |spark|28.57%|:red_circle:|
   |spark-common|41.54%|:green_circle:|
   |trino-connector|40.18%|:green_circle:|
   
   <details>
   <summary>Files</summary>
   
   |Module|File|Coverage||
   |:-|:-|:-|:-:|
   |core|[CatalogManager.java](https://github.com/qqqttt123/gravitino/blob/35f33900987e6cd1a392203e04440cd4faa0a278/core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java)|68.61%|:green_circle:|
   |filesystem-hadoop3|[GravitinoVirtualFileSystemConfiguration.java](https://github.com/qqqttt123/gravitino/blob/35f33900987e6cd1a392203e04440cd4faa0a278/clients/filesystem-hadoop3/src/main/java/org/apache/gravitino/filesystem/hadoop/GravitinoVirtualFileSystemConfiguration.java)|100.0%|:green_circle:|
   ||[BaseGVFSOperations.java](https://github.com/qqqttt123/gravitino/blob/35f33900987e6cd1a392203e04440cd4faa0a278/clients/filesystem-hadoop3/src/main/java/org/apache/gravitino/filesystem/hadoop/BaseGVFSOperations.java)|75.49%|:green_circle:|
   
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#11532] fix(docker): avoid duplicate image layer from recursive chmod [gravitino]

Posted by "mchades (via GitHub)" <gi...@apache.org>.
mchades closed pull request #11533: [#11532] fix(docker): avoid duplicate image layer from recursive chmod
URL: https://github.com/apache/gravitino/pull/11533


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#11532] fix(docker): avoid duplicate image layer from recursive chmod [gravitino]

Posted by "mchades (via GitHub)" <gi...@apache.org>.
mchades merged PR #11533:
URL: https://github.com/apache/gravitino/pull/11533


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org