kevinjqliu commented on code in PR #19260:
URL: https://github.com/apache/iceberg/pull/19260#discussion_r4763069501


##########
docker/iceberg-rest-fixture/Dockerfile:
##########
@@ -17,15 +17,13 @@
 # under the License.
 #
 
-FROM azul/zulu-openjdk:17-jre-headless
+FROM eclipse-temurin:21-jre-noble

Review Comment:
   switches to `eclipse-temurin:21-jre-noble` (docker official image, ubuntu 
24.04 lts, java 21 matching the build workflow — same base image used by other 
apache docker images like spark and flink).
   
   kept ubuntu instead of alpine so downstream images extending this one with 
`apt-get`, `bash`, or glibc native libs dont break, while getting off ubuntu 
22.04 ahead of its standard eol.



##########
docker/iceberg-rest-fixture/Dockerfile:
##########
@@ -17,15 +17,13 @@
 # under the License.
 #
 
-FROM azul/zulu-openjdk:17-jre-headless
+FROM eclipse-temurin:21-jre-noble
 
 # Set up the user and group
 RUN  set -xeu && \
+     userdel -r ubuntu && \
      groupadd iceberg --gid 1000 && \
-     useradd iceberg --uid 1000 --gid 1000 --create-home && \
-     apt-get update && \
-     apt-get install -y --no-install-recommends curl && \
-     rm -rf /var/lib/apt/lists/*
+     useradd iceberg --uid 1000 --gid 1000 --create-home

Review Comment:
   ubuntu 24.04 pre-creates uid/gid 1000 as `ubuntu`, so remove it first before 
creating `iceberg:1000`.
   
   `eclipse-temurin:21-jre-noble` already ships `curl`, so we can drop `apt-get 
update && apt-get install curl` completely. this also removes the ~127 MB 
`/var/cache/apt` bloat that newer `azul/zulu-openjdk` images were leaving 
behind (bringing the image from 650 MB down to 558 MB uncompressed on arm64 / 
523 MB on amd64, ~364 MB to ~308 MB compressed).



##########
.github/workflows/publish-iceberg-rest-fixture-docker.yml:
##########
@@ -79,3 +79,12 @@ jobs:
         platforms: linux/amd64,linux/arm64
         push: true
         tags: ${{ env.DOCKER_REPOSITORY }}/${{ env.DOCKER_IMAGE_TAG }}:${{ 
env.DOCKER_IMAGE_VERSION }}
+        labels: |
+          org.opencontainers.image.title=Apache Iceberg REST Fixture
+          org.opencontainers.image.description=Test fixture implementation of 
the Apache Iceberg REST Catalog
+          org.opencontainers.image.url=https://iceberg.apache.org
+          
org.opencontainers.image.documentation=https://github.com/apache/iceberg/blob/main/docker/iceberg-rest-fixture/README.md
+          org.opencontainers.image.source=https://github.com/apache/iceberg
+          org.opencontainers.image.revision=${{ github.sha }}
+          org.opencontainers.image.version=${{ env.DOCKER_IMAGE_VERSION }}
+          org.opencontainers.image.licenses=Apache-2.0

Review Comment:
   adds standard oci labels so registries and anyone inspecting an image 
(especially `:latest` or a mirrored/re-tagged release) can trace it back to its 
commit, version, docs, and license without cracking open a jar.



##########
docker/iceberg-rest-fixture/Dockerfile:
##########
@@ -46,13 +44,13 @@ ENV 
CATALOG_URI=jdbc:sqlite:/tmp/iceberg_catalog.db?journal_mode=WAL
 ENV CATALOG_JDBC_USER=user
 ENV CATALOG_JDBC_PASSWORD=password
 ENV CATALOG_JDBC_STRICT__MODE=true
-ENV REST_PORT=8181
+ENV CATALOG_REST_PORT=8181
 
 # Healthcheck for the iceberg rest service
 HEALTHCHECK --retries=10 --interval=1s \
-  CMD curl --fail http://localhost:$REST_PORT/v1/config || exit 1
+  CMD curl -fsS -o /dev/null "http://localhost:${CATALOG_REST_PORT}/v1/config"; 
|| exit 1
 
-EXPOSE $REST_PORT
+EXPOSE $CATALOG_REST_PORT

Review Comment:
   `RESTCatalogServer` reads `rest.port` from `CATALOG_REST_PORT`, not 
`REST_PORT` (which was ignored by the server), so neither env var worked on its 
own before. switching `Dockerfile` to `CATALOG_REST_PORT` keeps the server, 
`EXPOSE`, and `HEALTHCHECK` in sync.
   
   also switched `HEALTHCHECK` to `curl -fsS -o /dev/null` so the 1s poll 
doesnt dump the `/v1/config` payload or progress bar into `docker inspect` 
while still logging errors.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to