ARG VERSION=latest FROM floci/floci:${VERSION} LABEL org.opencontainers.image.title="Floci (compat)" \ org.opencontainers.image.description="Floci compatibility image with AWS CLI and boto3 pre-installed" \ 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" ENV AWS_DEFAULT_REGION=us-east-1 ENV AWS_ACCESS_KEY_ID=test ENV AWS_SECRET_ACCESS_KEY=test ENV AWS_ENDPOINT_URL="http://localhost:4566" ENV AWS_CONFIG_FILE=/etc/floci/aws/config USER root RUN microdnf install -y --nodocs python3 python3-pip \ && pip3 install --no-cache-dir awscli boto3 \ && microdnf clean all \ && rm -rf /root/.cache/pip COPY bin/awslocal /usr/local/bin/awslocal RUN chmod +x /usr/local/bin/awslocal # Pre-create the init-hook directories so archive-based copies (Testcontainers # withCopyFileToContainer / `docker cp`) can drop hooks straight into them. # Docker's archive extract unpacks into an existing dir and never mkdir -p's the # parents, so without these the copy fails. Mirrors LocalStack, which ships # /etc/localstack/init. Owned by the runtime user (uid 1001, group root). RUN mkdir -p /etc/localstack/init/boot.d /etc/localstack/init/start.d /etc/localstack/init/ready.d \ /etc/floci/init/boot.d /etc/floci/init/start.d /etc/floci/init/ready.d \ && chown -R 1001:root /etc/localstack /etc/floci USER 1001