Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ updates:
# (https://docs.astral.sh/uv/guides/integration/dependabot/).
- package-ecosystem: uv
directories:
- /docker/tools/azure
- /docker/tools/sam
- /docker/tools/snowflake
schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

- name: Smoke test MCP startup
env:
HARNESS_SKIP: prompt,docs,status,start,aws,logs,state,cloudpods,appinspector,chaos,iam,replicator,ephemeral,deploy,deploy-cdk,extensions,restart,stop,snowflake
HARNESS_SKIP: prompt,docs,status,start,aws,logs,state,cloudpods,appinspector,chaos,iam,replicator,ephemeral,deploy,deploy-cdk,extensions,restart,stop,snowflake,azure
run: |
node tests/docker/validate-image.mjs -- \
docker run -i --rm \
Expand Down
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,21 @@ RUN --mount=from=uv,source=/uv,target=/bin/uv \
&& ln -s /opt/snowflake-cli/bin/snow /usr/local/bin/snow \
&& snow --version

# The Azure CLI for localstack-azure-client, on the image's python3 from its own uv project
# rather than Microsoft's apt package (a second Python plus bytecode, about twice the size). No
# bytecode is compiled here: `az` writes it on first use of each module, while the container
# runs. Microsoft's own packages also drop the SDKs' async clients (aio), which az never imports.
RUN --mount=from=uv,source=/uv,target=/bin/uv \
--mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=docker/tools/azure,target=/tmp/tools/azure \
UV_PROJECT_ENVIRONMENT=/opt/azure-cli \
uv sync --project /tmp/tools/azure --locked --no-install-project --no-build \
--python /usr/bin/python3 \
&& find /opt/azure-cli/lib -type d \( -name tests -o -name test \) -prune -exec rm -rf '{}' + \
&& find /opt/azure-cli/lib/python3.11/site-packages/azure/mgmt -type d -name aio -prune -exec rm -rf '{}' + \
&& ln -s /opt/azure-cli/bin/az /usr/local/bin/az \
&& az version

# lstk wraps the AWS CLI, terraform, cdk, and sam. aws-cdk >= 2.1138 honors the
# CDK_S3_FORCE_PATH_STYLE that lstk sets, so S3 assets reach host.docker.internal path-style.
COPY docker/tools/npm/package.json docker/tools/npm/package-lock.json /opt/image-tools/npm/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ If you installed from source, change `command` and `args` to point to your local

### Run with Docker

The `localstack/localstack-mcp-server` Docker image bundles `lstk` with the AWS CLI v2, Terraform, CDK, and SAM, and the Snowflake CLI. The only required host dependency is Docker. The container uses the mounted Docker socket to run LocalStack as a sibling container on the host; state lives in a named Docker volume (`localstack-mcp`) unless `LOCALSTACK_VOLUME_DIR` points at a host directory.
The `localstack/localstack-mcp-server` Docker image bundles `lstk` with the AWS CLI v2, Terraform, CDK, and SAM, the Azure CLI, and the Snowflake CLI. The only required host dependency is Docker. The container uses the mounted Docker socket to run LocalStack as a sibling container on the host; state lives in a named Docker volume (`localstack-mcp`) unless `LOCALSTACK_VOLUME_DIR` points at a host directory.

If you use the deployer tool with local Terraform, CDK, or SAM projects, bind-mount those project paths into the MCP container and pass the in-container path to the tool. The simplest convention is to mount projects at the same absolute path they use on the host.

Expand Down Expand Up @@ -211,7 +211,7 @@ See **[docs/DOCKER.md](./docs/DOCKER.md)** for the run command, MCP client confi
| Variable Name | Description | Default Value |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| `LOCALSTACK_AUTH_TOKEN` (**required**) | The LocalStack Auth Token to use for the MCP server | None |
| `LOCALSTACK_HOSTNAME` | Host name of the LocalStack gateway the tools call; in Docker, `host.docker.internal`. The Azure tool always calls `azure.localhost.localstack.cloud` (127.0.0.1), so it needs a local gateway. | `localhost` |
| `LOCALSTACK_HOSTNAME` | Host name of the LocalStack gateway the tools call; in Docker, `host.docker.internal`. The Azure tool always calls `azure.localhost.localstack.cloud` (127.0.0.1); in Docker the server forwards that port to this host. | `localhost` |
| `LOCALSTACK_PORT` | Port of the LocalStack gateway the tools call. | `4566` |
| `MAIN_CONTAINER_NAME` | Container name for Docker-based tools and the container `start` creates. When unset, `start` uses `localstack-main`; the tools find it, lstk's containers, then LocalStack images ([lstk](#using-lstk)). | Auto-detect |
| `LOCALSTACK_IMAGE_NAME` / `IMAGE_NAME` | Docker image the `start` action launches for the AWS stack. `LOCALSTACK_IMAGE_NAME` wins when both are set (beware: bare `IMAGE_NAME` is a common CI variable). | `localstack/localstack-pro:latest` |
Expand Down
16 changes: 16 additions & 0 deletions docker/tools/azure/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Azure CLI for the Docker image. Not a Python package: the Dockerfile installs this project's
# locked dependencies (uv.lock) into a venv of their own. Dependabot updates both files.
# Installed from PyPI onto the image's python3 rather than from Microsoft's apt package, which
# bundles a second Python and precompiled bytecode and is about twice the size.
[project]
name = "image-tool-azure-cli"
version = "0"
# The image's python3 (Debian bookworm).
requires-python = "==3.11.*"
dependencies = ["azure-cli==2.93.0"]

[tool.uv]
package = false
# Only resolve releases at least a week old. The cooldown in .github/dependabot.yml matches,
# so Dependabot never proposes a version uv refuses to lock.
exclude-newer = "1 week"
Loading