fix: adding aws-cli in its own floci image hectorvent/floci:x.y.z-aws (#151)

This commit is contained in:
Hector Ventura authored and GitHub committed 2026-03-31 18:30:29 -05:00
1 parent 1e2950a3aa
commit aba95933cf
3 files changed
+23 -44

No files matched your search

+14
View File
@@ -137,6 +137,20 @@ jobs:
build-args: |
VERSION=${{ steps.version.outputs.version }}
- name: Build and push JVM image (With AWS CLI)
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.jvm-package
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/floci:${{ steps.version.outputs.version }}-aws
${{ secrets.DOCKERHUB_USERNAME }}/floci:latest-aws
build-args: |
VERSION=${{ steps.version.outputs.version }}
INSTALL_AWS_CLI=true
# ── Push native Docker images (multi-arch manifest) ───────────────────────
push-native:
name: Push native Docker images
-40
View File
@@ -1,40 +0,0 @@
# 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: AWS CLI
FROM debian:stable-slim AS aws
RUN apt-get update && apt-get install -y --no-install-recommends curl unzip ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN ARCH=$(uname -m) && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-${ARCH}.zip" -o awscliv2.zip && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf awscliv2.zip aws
# Stage 3: Runtime
FROM eclipse-temurin:25-jre
WORKDIR /app
COPY --from=build /build/target/quarkus-app/ quarkus-app/
COPY --from=aws /usr/local/aws-cli/ /usr/local/aws-cli/
RUN ln -s /usr/local/aws-cli/v2/current/bin/aws /usr/local/bin/aws && \
ln -s /usr/local/aws-cli/v2/current/bin/aws_completer /usr/local/bin/aws_completer
RUN mkdir -p /app/data
VOLUME /app/data
EXPOSE 4566 6379-6399
ARG VERSION=latest
ENV FLOCI_VERSION=${VERSION}
ENTRYPOINT ["java", "-jar", "quarkus-app/quarkus-run.jar"]
+9 -4
View File
@@ -1,11 +1,19 @@
FROM eclipse-temurin:25-jre-alpine
ARG VERSION=latest
ARG INSTALL_AWS_CLI=false
ENV FLOCI_VERSION=${VERSION}
WORKDIR /app
RUN mkdir -p /app/data \
&& chown 1001:root /app \
&& chmod "g+rwX" /app \
&& chown 1001:root /app/data
&& chown 1001:root /app/data \
&& if [ "$INSTALL_AWS_CLI" = "true" ]; then \
apk add --no-cache aws-cli; \
fi
VOLUME /app/data
@@ -13,9 +21,6 @@ COPY --chown=1001:root target/quarkus-app quarkus-app/
EXPOSE 4566 6379-6399
ARG VERSION=latest
ENV FLOCI_VERSION=${VERSION}
USER 1001
ENTRYPOINT ["java", "-jar", "quarkus-app/quarkus-run.jar", "-Dquarkus.http.host=0.0.0.0"]