Skip to content

armgit / floci

Public Imported from GitHub
0

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

chore(docker): ship awslocal wrapper in the -compat image (#746)

Niklas Herder97b08f62bc45
diff --git a/.dockerignore b/.dockerignore
index eede665231..01493fb126 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -1,4 +1,5 @@
*
+!bin/awslocal
!docker/entrypoint.sh
!docker/localstack-parity.sh
!pom.xml
diff --git a/bin/awslocal b/bin/awslocal
index af9a4d01c3..6bdc6c9f44 100755
--- a/bin/awslocal
+++ b/bin/awslocal
@@ -27,4 +27,7 @@ export AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID:-test}"
export AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY:-test}"
export AWS_DEFAULT_REGION="${_REGION}"
-exec aws "$@"
\ No newline at end of file
+# Pass --endpoint-url explicitly: a few SDKs/services (notably SQS in older
+# botocore) silently bypass AWS_ENDPOINT_URL via service-specific endpoint
+# resolvers, sending the call to public AWS instead of Floci.
+exec aws --endpoint-url "${_ENDPOINT}" "$@"
\ No newline at end of file
diff --git a/docker/Dockerfile.compat b/docker/Dockerfile.compat
index ede2b3e268..d8fe77a874 100644
--- a/docker/Dockerfile.compat
+++ b/docker/Dockerfile.compat
@@ -13,4 +13,7 @@ RUN microdnf install -y --nodocs python3 python3-pip \
&& microdnf clean all \
&& rm -rf /root/.cache/pip
+COPY bin/awslocal /usr/local/bin/awslocal
+RUN chmod +x /usr/local/bin/awslocal
+
USER 1001