Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ COPY --from=build /build/target/quarkus-app/ quarkus-app/
RUN mkdir -p /app/data
VOLUME /app/data

RUN apk add --no-cache curl

EXPOSE 4566 6379-6399

HEALTHCHECK --interval=5s --timeout=3s --retries=5 \
CMD curl -f http://localhost:4566/_floci/health || exit 1

ARG VERSION=latest
ENV FLOCI_VERSION=${VERSION}

Expand Down
6 changes: 5 additions & 1 deletion Dockerfile.jvm-package
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN mkdir -p /app/data \
&& chown 1001:root /app \
&& chmod "g+rwX" /app \
&& chown 1001:root /app/data \
&& apk add --no-cache curl \
&& if [ "$INSTALL_AWS_CLI" = "true" ]; then \
apk add --no-cache aws-cli; \
fi
Expand All @@ -21,6 +22,9 @@ COPY --chown=1001:root target/quarkus-app quarkus-app/

EXPOSE 4566 6379-6399

HEALTHCHECK --interval=5s --timeout=3s --retries=5 \
CMD curl -f http://localhost:4566/_floci/health || exit 1

USER 1001

ENTRYPOINT ["java", "-jar", "quarkus-app/quarkus-run.jar", "-Dquarkus.http.host=0.0.0.0"]
ENTRYPOINT ["java", "-jar", "quarkus-app/quarkus-run.jar", "-Dquarkus.http.host=0.0.0.0"]
7 changes: 6 additions & 1 deletion Dockerfile.native
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,18 @@ FROM quay.io/quarkus/quarkus-micro-image:2.0

USER root
WORKDIR /app
RUN mkdir -p /app/data \
RUN microdnf install -y curl \
&& microdnf clean all \
&& mkdir -p /app/data \
&& chown -R 1001:root /app \
&& chmod -R g+rwX /app
VOLUME /app/data

EXPOSE 4566

HEALTHCHECK --interval=5s --timeout=3s --retries=5 \
CMD curl -f http://localhost:4566/_floci/health || exit 1

ARG VERSION=latest
ENV FLOCI_VERSION=${VERSION}

Expand Down
9 changes: 7 additions & 2 deletions Dockerfile.native-package
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ ENV FLOCI_VERSION=${VERSION}

WORKDIR /app

RUN mkdir -p /app/data \
RUN microdnf install -y curl \
&& microdnf clean all \
&& mkdir -p /app/data \
&& chown -R 1001:root /app \
&& chmod -R g+rwX /app

Expand All @@ -18,6 +20,9 @@ COPY --chown=1001:root target/*-runner /app/application

EXPOSE 4566

HEALTHCHECK --interval=5s --timeout=3s --retries=5 \
CMD curl -f http://localhost:4566/_floci/health || exit 1
Comment on lines +21 to +22

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 HEALTHCHECK uses curl which is not installed in ubi9-minimal base image

The ubi9-minimal:9.7 base image does not include curl by default (it ships with only microdnf and a very minimal set of utilities). The HEALTHCHECK command curl -f http://localhost:4566/_floci/health will always fail with a "command not found" error, causing Docker to permanently mark the container as unhealthy. This can trigger restart loops in orchestrators or block dependent services that use depends_on: condition: service_healthy.

Prompt for agents
The HEALTHCHECK in Dockerfile.native-package uses `curl` but the base image `registry.access.redhat.com/ubi9-minimal:9.7` does not include curl. Options to fix: (1) Install curl-minimal via microdnf: add `RUN microdnf install -y curl-minimal && microdnf clean all` before the HEALTHCHECK. (2) Use a tool already present in ubi9-minimal, such as a shell-based TCP check if available. (3) Match the pattern used in Dockerfile.native with a raw TCP approach, but ensure the shell supports it (ubi9-minimal has bash available unlike micro images). For example: `CMD bash -c 'echo -e "GET /_floci/health HTTP/1.0\r\nHost: localhost\r\n\r\n" > /dev/tcp/localhost/4566' || exit 1`.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

False positive — curl is present in ubi9-minimal:9.7:

$ docker run --rm registry.access.redhat.com/ubi9-minimal:9.7 ls -lh /usr/bin/curl
-rwxr-xr-x 1 root root 193K Dec  2 11:04 /usr/bin/curl

$ docker run --rm registry.access.redhat.com/ubi9-minimal:9.7 curl --version | head -1
curl 7.76.1 (x86_64-redhat-linux-gnu) libcurl/7.76.1 OpenSSL/3.5.1 zlib/1.2.11 nghttp2/1.43.0


USER 1001

CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]