Skip to content

armgit / floci

Public Imported from GitHub
0

Light, fluffy, and always free - The AWS Local Emulator alternative

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

Hector Venturaaba95933cfa7
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2b694be915..888336379c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -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
diff --git a/Dockerfile.awscli b/Dockerfile.awscli
deleted file mode 100644
index 81d21168ea..0000000000
--- a/Dockerfile.awscli
+++ /dev/null
@@ -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"]
diff --git a/Dockerfile.jvm-package b/Dockerfile.jvm-package
index feddf0a733..e3eee37a1b 100644
--- a/Dockerfile.jvm-package
+++ b/Dockerfile.jvm-package
@@ -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"]
\ No newline at end of file