Repository navigation
Conversation
Replace tflocal, cdklocal, and samlocal with `lstk terraform|cdk|sam`. The deployer always passes AWS_ENDPOINT_URL so lstk targets the configured LocalStack instead of its own config.toml container, and leaves the S3 endpoint to lstk, which forces path-style S3 for CDK. The Docker image installs lstk 1.4.2 and aws-cdk 2.1145.0, drops the *local wrappers and the aws-cdk path-style patch, and no longer needs the s3.host.docker.internal alias. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ge (#98) Install azure-cli from Microsoft's apt repo. Inside the container, *.localhost.localstack.cloud names resolve to the container itself, and --add-host cannot cover the emulator's per-account storage hosts, so the server forwards 127.0.0.1:<LOCALSTACK_PORT> to LOCALSTACK_HOSTNAME when it runs in a container with LocalStack elsewhere. Document the Azure CLI in the image and add an Azure scenario to the Docker validation harness (group, storage account, blob upload). Co-authored-by: Bart <bart@Barts-MacBook-Pro.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Brings #98 (Azure CLI in the image) onto current main. Every file matches main except #98's own changes, so this branch no longer carries #97's pre-squash commit. The Dockerfile now installs the Azure CLI in its own layer on main's per-tool structure; apt reads Microsoft's armored key directly, so the image needs no gnupg. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…size Microsoft's apt package bundles its own Python 3.14 and precompiled bytecode: 679 MB installed. The Azure CLI from PyPI on the image's python3, without bytecode and without the SDKs' async clients, is 341 MB on arm64. `az` writes its bytecode on first use of each module (the tool's child environment does not pass PYTHONDONTWRITEBYTECODE), so only the first call per command is slower, by about 0.3-0.4 s. The version now lives in docker/tools/azure/uv.lock, which Dependabot updates like the SAM and Snowflake projects, and the image keeps a single Python. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lands #98 on
main. #98 merged into #97's branch after #97 had been squash-merged, so its change never reachedmain. This branch now differs frommainonly by #98 and by a smaller way of installing the Azure CLI.Summary
The image bundles the Azure CLI, so
localstack-azure-clientworks from Docker instead of answering thatazis missing.Installing
azis not enough by itself. Inside the container, every*.localhost.localstack.cloudname resolves to127.0.0.1, which is the container itself, and the emulator gives each storage account its own host (<account>.blob.core.azure.localhost.localstack.cloud). So the server forwards its loopback gateway port to LocalStack:sequenceDiagram participant az as az (in MCP container) participant fwd as 127.0.0.1:4566 forwarder participant LS as LocalStack (host.docker.internal:4566) az->>fwd: TLS to acct.blob.core.azure.localhost.localstack.cloud fwd->>LS: raw TCP pipe (SNI and cert unchanged) LS-->>az: responsesrc/cli/index.ts (default: start server) exitWhenClientDisconnects() + forwardLoopbackGateway() # only in a container (/.dockerenv) with a non-local LOCALSTACK_HOSTNAME require("./stdio.js")The Azure CLI comes from PyPI through a uv project, like SAM and Snowflake, not from Microsoft's apt package as in #98:
Microsoft's apt package bundles its own Python 3.14 and 314 MB of precompiled bytecode. The PyPI install keeps one Python in the image, and its version is pinned in a lockfile that Dependabot updates.
Evidence
Image size (
du -sxm /inside the image;docker image inspectreports a compressed size for the non-native platform):maindocker history: the Azure CLI layer is 341 MB on arm64, compared with 679 MB for #98's apt package.Startup cost of skipping bytecode (arm64, the Azure tool's environment).
azwrites the bytecode on the first use of each module, because the tool's child environment does not passPYTHONDONTWRITEBYTECODE:az storage account create --helpTests:
yarn test: 912 passed, 2 skipped, including the forwarder tests from feat(docker): bundle the Azure CLI so the Azure tool works in the image #98 anddependency-pins.test.ts.az versionreportsazure-cli 2.93.0, andaz storage blob upload --helpruns.azurescenario intests/docker/validate-image.mjs(it needsLOCALSTACK_AUTH_TOKEN). The Docker workflow runs it on this PR.Merge Danger
Door: two-way
Blast Radius: Docker image
LOCALSTACK_HOSTNAME, and binds only127.0.0.1:<LOCALSTACK_PORT>, where nothing listened before. npx and from-source runs are unaffected. If the port is taken (--network host), nothing is forwarded and nothing crashes.🤖 Generated with Claude Code