FROM registry.access.redhat.com/ubi9-minimal:9.7 ARG VERSION=latest # Automatically set by Docker BuildKit to "amd64" or "arm64" ARG TARGETARCH ENV FLOCI_VERSION=${VERSION} ENV FLOCI_STORAGE_PERSISTENT_PATH=/app/data # ubi9-minimal already ships shadow-utils (useradd) and coreutils (chroot), so no package is # installed and no binary is downloaded: the entrypoint drops privileges with # `chroot --userspec`, which replaces gosu, and adds the Docker socket's group with # `chroot --groups`, which replaces the runtime usermod. Measured on 2.0.1 the layer this # replaces was 3.66 MB compressed and 19 MB on disk. RUN useradd -r -u 1001 -g root -d /app -s /sbin/nologin floci WORKDIR /app RUN mkdir -p /app/data \ && chown -R 1001:root /app \ && chmod -R g+rwX /app VOLUME /app/data COPY --chmod=755 --chown=1001:root native/${TARGETARCH}/ /app/ COPY --chmod=755 docker/entrypoint.sh /usr/local/bin/docker-entrypoint.sh COPY --chmod=755 docker/localstack-parity.sh /usr/local/bin/localstack-parity.sh LABEL org.opencontainers.image.title="Floci" \ org.opencontainers.image.description="Local AWS emulator — open-source alternative to LocalStack Community" \ org.opencontainers.image.url="https://floci.io" \ org.opencontainers.image.source="https://github.com/floci-io/floci" \ org.opencontainers.image.licenses="MIT" \ org.opencontainers.image.vendor="Floci" \ description="Local AWS emulator — open-source alternative to LocalStack Community" \ io.k8s.description="Local AWS emulator — open-source alternative to LocalStack Community" \ io.k8s.display-name="Floci" \ io.openshift.expose-services="4566:tcp" \ io.openshift.tags="floci aws-emulator" \ maintainer="Floci " \ name="floci/floci" \ summary="Local AWS emulator — open-source alternative to LocalStack Community" \ url="https://floci.io" \ vendor="Floci" EXPOSE 4566 HEALTHCHECK --interval=5s --timeout=3s --retries=5 \ CMD curl -f http://localhost:4566/_floci/health || exit 1 ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] CMD ["/app/application", "-Dquarkus.http.host=0.0.0.0"]