Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ VOLUME /app/data

EXPOSE 4566 6379-6399

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

ARG VERSION=latest
ENV FLOCI_VERSION=${VERSION}

Expand Down
5 changes: 4 additions & 1 deletion Dockerfile.jvm-package
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ COPY --chown=1001:root target/quarkus-app quarkus-app/

EXPOSE 4566 6379-6399

HEALTHCHECK --interval=5s --timeout=3s --retries=5 \
CMD wget -q --spider 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"]
3 changes: 3 additions & 0 deletions Dockerfile.native
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ VOLUME /app/data

EXPOSE 4566

HEALTHCHECK --interval=5s --timeout=3s --retries=5 \
CMD bash -c 'echo -e "GET /_floci/health HTTP/1.0\r\nHost: localhost\r\n\r\n" > /dev/tcp/localhost/4566' || exit 1
Comment on lines +28 to +29
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 bash which is not available in quarkus-micro-image base image

The quarkus-micro-image:2.0 is based on UBI Micro, an extremely minimal image that does not include bash (only /bin/sh at most, and no package manager to install it). The HEALTHCHECK command bash -c 'echo -e "GET /_floci/health HTTP/1.0\r\n..." > /dev/tcp/localhost/4566' will fail because bash is not found. Additionally, the /dev/tcp pseudo-device is a bash-specific feature unavailable in other shells. The container will be permanently marked unhealthy by Docker, which can cause restart loops and block dependent services.

Prompt for agents
The HEALTHCHECK in Dockerfile.native uses `bash` and bash-specific `/dev/tcp` but the base image `quarkus-micro-image:2.0` (UBI Micro) has neither bash nor a package manager to install it. Since UBI Micro is intentionally stripped down, there are limited options: (1) Install a small static HTTP client binary (e.g. copy a statically-compiled curl or wget from a build stage). (2) Use a Quarkus-native health check mechanism instead of a Docker HEALTHCHECK. (3) Switch to a slightly less minimal base image (e.g. ubi-minimal) that includes or can install bash/curl. (4) Use the native application itself to implement a health-check subcommand if supported.
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 — bash is present in quarkus-micro-image:2.0:

$ docker run --rm quay.io/quarkus/quarkus-micro-image:2.0 bash --version | head -1
GNU bash, version 4.4.20(1)-release (x86_64-redhat-linux-gnu)

And /dev/tcp works as expected (returns "Connection refused" when no server is running, confirming bash processes the pseudo-device):

$ docker run --rm quay.io/quarkus/quarkus-micro-image:2.0 bash -c 'echo > /dev/tcp/localhost/4566' 2>&1
bash: connect: Connection refused


ARG VERSION=latest
ENV FLOCI_VERSION=${VERSION}

Expand Down
5 changes: 4 additions & 1 deletion Dockerfile.native-package
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,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"]