mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
* feat: officially support Docker named volumes for Native images * Pre-creates /app/data and assigns 1001 ownership in Dockerfile.native and Dockerfile.native-package before declaring VOLUME and dropping to USER 1001. This natively fixes the AccessDeniedException when utilizing Docker named volumes instead of local bind mounts, aligning container architecture flawlessly with tools like LocalStack. * Standardizes named volumes as officially documented optional alternatives across docker-compose templates in quick-start, index, and README documentation for a cleaner repository drop-in replacement footprint. * feat: natively support Docker named volumes via recursive permissions * Pre-creates /app/data and applies recursive 1001:root ownership and g+rwX permissions in Dockerfile.native and Dockerfile.native-package before declaring VOLUME and dropping to USER 1001. This elegantly resolves AccessDeniedException crashes when mapping Docker named volumes instead of local binds, natively supporting frictionless LocalStack-style drop-in architecture. * Standardizes named volumes as officially documented optional alternatives across docker-compose templates in quick-start, index, and README documentation for a cleaner repository drop-in replacement footprint.
36 lines
890 B
Docker
36 lines
890 B
Docker
# Stage 1: Build native executable
|
|
FROM quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-24 AS build
|
|
USER root
|
|
WORKDIR /app
|
|
|
|
# Install Maven 3.9.x (system Maven is too old for Quarkus 3.31)
|
|
RUN curl -fsSL https://archive.apache.org/dist/maven/maven-3/3.9.12/binaries/apache-maven-3.9.12-bin.tar.gz | tar xz -C /opt \
|
|
&& ln -sf /opt/apache-maven-3.9.12/bin/mvn /usr/local/bin/mvn
|
|
|
|
COPY pom.xml .
|
|
RUN mvn dependency:go-offline -B
|
|
COPY src ./src
|
|
|
|
RUN mvn clean package -Dnative -DskipTests -B
|
|
|
|
# Stage 2: Minimal runtime
|
|
FROM quay.io/quarkus/quarkus-micro-image:2.0
|
|
|
|
USER root
|
|
WORKDIR /app
|
|
RUN mkdir -p /app/data \
|
|
&& chown -R 1001:root /app \
|
|
&& chmod -R g+rwX /app
|
|
VOLUME /app/data
|
|
|
|
EXPOSE 4566
|
|
|
|
ARG VERSION=latest
|
|
ENV FLOCI_VERSION=${VERSION}
|
|
|
|
COPY --from=build /app/target/*-runner /app/application
|
|
RUN chmod +x /app/application
|
|
|
|
USER 1001
|
|
ENTRYPOINT ["/app/application"]
|