mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
* chore(docker): ship awslocal wrapper in the -compat image bin/awslocal was added to the repo in #638 but is not COPYed into any of the published Docker images. That makes existing LocalStack init scripts mounted at /etc/localstack/init/ready.d/ — which overwhelmingly use `awslocal kinesis …` rather than `aws --endpoint-url=… kinesis …` — fail with "command not found" on the supposedly drop-in -compat image. The script also needed an entry in .dockerignore: the file is allow-list style ("*" + "!path") and bin/awslocal was not in the allow list, so it never reached the build context. Without that line the COPY fails with "file not found in build context". Closes #744. The orthogonal SQS endpoint-resolver issue tracked in #745 is unaffected by this change — awslocal as written only exports AWS_ENDPOINT_URL, which the bundled botocore silently ignores for SQS. * fix(awslocal): pass --endpoint-url explicitly to honor hard-pin contract LocalStack's awslocal idiom is "hard-pin the endpoint" — that's the whole point of the wrapper. Setting AWS_ENDPOINT_URL alone is not sufficient: the bundled aws-cli/1.44.87 + botocore/1.42.97 silently bypasses the env var for SQS via service-specific endpoint resolvers, sending requests to public AWS. With real credentials in CI/dev, that would silently provision real SQS queues — surfacing as the InvalidClientTokenId error documented in #745. Inject --endpoint-url before "$@" so the user's own --endpoint-url (if any) still wins via last-flag-wins. Verified: awslocal sqs create-queue and list-queues now route to Floci; kinesis/s3 still work; awslocal env subcommand unaffected; user override behaves correctly. Addresses Copilot's review feedback on #746 and the awslocal arm of #745.
20 lines
492 B
Docker
20 lines
492 B
Docker
ARG VERSION=latest
|
|
FROM floci/floci:${VERSION}
|
|
|
|
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
|
|
|
|
USER 1001
|