Files
floci/Dockerfile
T
Kenshin Okinaka a58f541e17 fix(docker): replace bash /dev/tcp HEALTHCHECK with busybox wget for Alpine runtime (#625)
Dockerfile is based on eclipse-temurin:25-jre-alpine, which does not
ship bash. The HEALTHCHECK invoked `bash -c '... > /dev/tcp/localhost/4566'`,
so containers built from this Dockerfile reported `unhealthy` with
"/bin/sh: bash: not found", breaking `depends_on: condition: service_healthy`
in downstream Compose files.

Switch to `wget -q --spider http://localhost:4566/_floci/health`, which
matches the line already in use in `Dockerfile.jvm-package` and runs
under plain `/bin/sh` using busybox `wget` — no extra package.

`Dockerfile.native` is left as-is: its `quarkus-micro-image:2.0` base
ships bash, so the existing `/dev/tcp` healthcheck works there.
2026-04-28 20:17:13 -05:00

32 lines
757 B
Docker

# Stage 1: Build
FROM eclipse-temurin:25-jdk AS build
WORKDIR /build
RUN apt-get update && apt-get install -y maven && rm -rf /var/lib/apt/lists/*
COPY pom.xml .
RUN mvn dependency:go-offline -q
COPY src/ src/
RUN mvn clean package -DskipTests -q
# Stage 2: Runtime
FROM eclipse-temurin:25-jre-alpine
WORKDIR /app
COPY --from=build /build/target/quarkus-app/ quarkus-app/
RUN mkdir -p /app/data
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}
ENV FLOCI_STORAGE_PERSISTENT_PATH=/app/data
ENTRYPOINT ["java", "--enable-native-access=ALL-UNNAMED", "-jar", "quarkus-app/quarkus-run.jar"]