Skip to content

Commit b18ab74

Browse files
dominikheiFokko
andauthored
Add curl to the iceberg-rest-fixture Docker image (#11705)
* Added command to install curl * Added command to cleanup apt cache * Added health probing * Update healthcheck --------- Co-authored-by: Fokko Driesprong <fokko@apache.org>
1 parent 0662373 commit b18ab74

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docker/iceberg-rest-fixture/Dockerfile

+8-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ FROM azul/zulu-openjdk:17-jre-headless
2222
# Set up the user and group
2323
RUN set -xeu && \
2424
groupadd iceberg --gid 1000 && \
25-
useradd iceberg --uid 1000 --gid 1000 --create-home
25+
useradd iceberg --uid 1000 --gid 1000 --create-home && \
26+
apt-get update && \
27+
apt-get install -y --no-install-recommends curl && \
28+
rm -rf /var/lib/apt/lists/*
2629

2730
# Working directory for the application
2831
WORKDIR /usr/lib/iceberg-rest
@@ -36,6 +39,10 @@ ENV CATALOG_JDBC_USER=user
3639
ENV CATALOG_JDBC_PASSWORD=password
3740
ENV REST_PORT=8181
3841

42+
# Healthcheck for the iceberg rest service
43+
HEALTHCHECK --retries=10 --interval=1s \
44+
CMD curl --fail http://localhost:$REST_PORT/v1/config || exit 1
45+
3946
EXPOSE $REST_PORT
4047
USER iceberg:iceberg
4148
ENV LANG=en_US.UTF-8

0 commit comments

Comments
 (0)