Skip to content

Commit

Permalink
Add curl to the iceberg-rest-fixture Docker image (apache#11705)
Browse files Browse the repository at this point in the history
* Added command to install curl

* Added command to cleanup apt cache

* Added health probing

* Update healthcheck

---------

Co-authored-by: Fokko Driesprong <[email protected]>
  • Loading branch information
dominikhei and Fokko authored Dec 9, 2024
1 parent 0662373 commit b18ab74
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docker/iceberg-rest-fixture/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ FROM azul/zulu-openjdk:17-jre-headless
# Set up the user and group
RUN set -xeu && \
groupadd iceberg --gid 1000 && \
useradd iceberg --uid 1000 --gid 1000 --create-home
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/*

# Working directory for the application
WORKDIR /usr/lib/iceberg-rest
Expand All @@ -36,6 +39,10 @@ ENV CATALOG_JDBC_USER=user
ENV CATALOG_JDBC_PASSWORD=password
ENV 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

EXPOSE $REST_PORT
USER iceberg:iceberg
ENV LANG=en_US.UTF-8
Expand Down

0 comments on commit b18ab74

Please sign in to comment.