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


##########
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` (via 
`RCKUtils.environmentCatalogConfig()`), never `REST_PORT`. Before this, 
overriding either env var alone put the server and `HEALTHCHECK` on different 
ports. Using `CATALOG_REST_PORT` everywhere keeps the server, `EXPOSE`, and 
`HEALTHCHECK` in sync.
   
   Also switched to `curl -fsS -o /dev/null` so the 1s healthcheck stays quiet 
on success instead of dumping `/v1/config` into `docker inspect`, while still 
logging errors.



##########
.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 can 
trace it back to its commit, version, docs, and license without cracking open a 
jar.



-- 
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