mcp-server-docker-dboeckli 0.6.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. mcp_server_docker_dboeckli-0.6.1/.dockerignore +1 -0
  2. mcp_server_docker_dboeckli-0.6.1/.gitattributes +1 -0
  3. mcp_server_docker_dboeckli-0.6.1/.github/dependabot.yml +11 -0
  4. mcp_server_docker_dboeckli-0.6.1/.github/renovate.json +56 -0
  5. mcp_server_docker_dboeckli-0.6.1/.github/rulesets/README.md +32 -0
  6. mcp_server_docker_dboeckli-0.6.1/.github/rulesets/main-1.json +22 -0
  7. mcp_server_docker_dboeckli-0.6.1/.github/rulesets/main-2.json +62 -0
  8. mcp_server_docker_dboeckli-0.6.1/.github/workflows/ci.yml +87 -0
  9. mcp_server_docker_dboeckli-0.6.1/.github/workflows/release.yml +127 -0
  10. mcp_server_docker_dboeckli-0.6.1/.gitignore +21 -0
  11. mcp_server_docker_dboeckli-0.6.1/.python-version +1 -0
  12. mcp_server_docker_dboeckli-0.6.1/Dockerfile +30 -0
  13. mcp_server_docker_dboeckli-0.6.1/LICENSE +675 -0
  14. mcp_server_docker_dboeckli-0.6.1/PKG-INFO +1095 -0
  15. mcp_server_docker_dboeckli-0.6.1/README.md +401 -0
  16. mcp_server_docker_dboeckli-0.6.1/devbox.json +22 -0
  17. mcp_server_docker_dboeckli-0.6.1/devbox.lock +134 -0
  18. mcp_server_docker_dboeckli-0.6.1/glama.json +6 -0
  19. mcp_server_docker_dboeckli-0.6.1/pyproject.toml +57 -0
  20. mcp_server_docker_dboeckli-0.6.1/src/mcp_server_docker/__init__.py +9 -0
  21. mcp_server_docker_dboeckli-0.6.1/src/mcp_server_docker/_version.py +3 -0
  22. mcp_server_docker_dboeckli-0.6.1/src/mcp_server_docker/output_schemas.py +79 -0
  23. mcp_server_docker_dboeckli-0.6.1/src/mcp_server_docker/redaction.py +24 -0
  24. mcp_server_docker_dboeckli-0.6.1/src/mcp_server_docker/server.py +984 -0
  25. mcp_server_docker_dboeckli-0.6.1/src/mcp_server_docker/settings.py +36 -0
  26. mcp_server_docker_dboeckli-0.6.1/tests/__init__.py +0 -0
  27. mcp_server_docker_dboeckli-0.6.1/tests/integration/conftest.py +84 -0
  28. mcp_server_docker_dboeckli-0.6.1/tests/integration/test_build_record.py +11 -0
  29. mcp_server_docker_dboeckli-0.6.1/tests/integration/test_docker_cli.py +47 -0
  30. mcp_server_docker_dboeckli-0.6.1/tests/support.py +30 -0
  31. mcp_server_docker_dboeckli-0.6.1/tests/test_redaction.py +20 -0
  32. mcp_server_docker_dboeckli-0.6.1/tests/test_server.py +866 -0
  33. mcp_server_docker_dboeckli-0.6.1/tests/test_settings.py +48 -0
  34. mcp_server_docker_dboeckli-0.6.1/tests/test_support.py +48 -0
  35. mcp_server_docker_dboeckli-0.6.1/tests/test_version.py +19 -0
  36. mcp_server_docker_dboeckli-0.6.1/uv.lock +1325 -0
@@ -0,0 +1 @@
1
+ .venv
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -0,0 +1,11 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "github-actions"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "daily"
@@ -0,0 +1,56 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": [
4
+ "config:recommended"
5
+ ],
6
+ "github-actions": {
7
+ "enabled": false
8
+ },
9
+ "dependencyDashboard": true,
10
+ "lockFileMaintenance": {
11
+ "enabled": true
12
+ },
13
+ "packageRules": [
14
+ {
15
+ "matchUpdateTypes": [
16
+ "major"
17
+ ],
18
+ "dependencyDashboardApproval": true
19
+ },
20
+ {
21
+ "matchPackageNames": [
22
+ "python"
23
+ ],
24
+ "allowedVersions": ">=3.12.0 <3.13.0"
25
+ },
26
+ {
27
+ "matchManagers": [
28
+ "pep621"
29
+ ],
30
+ "groupName": "Python dependencies"
31
+ },
32
+ {
33
+ "matchManagers": [
34
+ "dockerfile"
35
+ ],
36
+ "groupName": "Docker base images"
37
+ },
38
+ {
39
+ "matchManagers": [
40
+ "devbox"
41
+ ],
42
+ "groupName": "devbox packages"
43
+ },
44
+ {
45
+ "matchManagers": [
46
+ "devbox"
47
+ ],
48
+ "matchPackageNames": [
49
+ "nodejs"
50
+ ],
51
+ "allowedVersions": ">=26.0.0 <27.0.0",
52
+ "dependencyDashboardApproval": false,
53
+ "groupName": "Node.js"
54
+ }
55
+ ]
56
+ }
@@ -0,0 +1,32 @@
1
+ # Repository rulesets
2
+
3
+ Versioned copies of the active GitHub rulesets for `main`.
4
+
5
+ | File | Rules |
6
+ |------|-------|
7
+ | `main-1.json` | `deletion`, `non_fast_forward` |
8
+ | `main-2.json` | `required_linear_history`, `required_status_checks`, `pull_request` |
9
+
10
+ Adapted from an export of `dboeckli/spring-7-web-services`:
11
+
12
+ - Branch condition: `refs/heads/master` → `refs/heads/main`
13
+ - Required status check: `build` → `Test & lint`, `Integration tests`, `Docker image`
14
+ - Merge commits disabled in favor of linear history (squash/rebase only)
15
+ - Admin bypass (`RepositoryRole` actor 5) kept so the owner can bypass in emergencies
16
+
17
+ These files are reference copies. GitHub does not apply them automatically.
18
+
19
+ ## Apply
20
+
21
+ Create new rulesets (IDs and `source` fields are assigned by the target repository):
22
+
23
+ ```bash
24
+ gh api -X POST repos/{owner}/{repo}/rulesets --input .github/rulesets/main-1.json
25
+ gh api -X POST repos/{owner}/{repo}/rulesets --input .github/rulesets/main-2.json
26
+ ```
27
+
28
+ Update an existing ruleset by ID with `PUT`:
29
+
30
+ ```bash
31
+ gh api -X PUT repos/{owner}/{repo}/rulesets/{id} --input .github/rulesets/main-2.json
32
+ ```
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "main-1",
3
+ "target": "branch",
4
+ "enforcement": "active",
5
+ "conditions": {
6
+ "ref_name": {
7
+ "exclude": [],
8
+ "include": [
9
+ "refs/heads/main"
10
+ ]
11
+ }
12
+ },
13
+ "rules": [
14
+ {
15
+ "type": "deletion"
16
+ },
17
+ {
18
+ "type": "non_fast_forward"
19
+ }
20
+ ],
21
+ "bypass_actors": []
22
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "main-2",
3
+ "target": "branch",
4
+ "enforcement": "active",
5
+ "conditions": {
6
+ "ref_name": {
7
+ "exclude": [],
8
+ "include": [
9
+ "refs/heads/main"
10
+ ]
11
+ }
12
+ },
13
+ "rules": [
14
+ {
15
+ "type": "required_linear_history"
16
+ },
17
+ {
18
+ "type": "required_status_checks",
19
+ "parameters": {
20
+ "strict_required_status_checks_policy": true,
21
+ "do_not_enforce_on_create": true,
22
+ "required_status_checks": [
23
+ {
24
+ "context": "Test & lint",
25
+ "integration_id": 15368
26
+ },
27
+ {
28
+ "context": "Integration tests",
29
+ "integration_id": 15368
30
+ },
31
+ {
32
+ "context": "Docker image",
33
+ "integration_id": 15368
34
+ }
35
+ ]
36
+ }
37
+ },
38
+ {
39
+ "type": "pull_request",
40
+ "parameters": {
41
+ "required_approving_review_count": 1,
42
+ "dismiss_stale_reviews_on_push": true,
43
+ "required_reviewers": [],
44
+ "require_code_owner_review": true,
45
+ "require_last_push_approval": true,
46
+ "required_review_thread_resolution": true,
47
+ "require_extra_approval_for_unattributed_changes": true,
48
+ "allowed_merge_methods": [
49
+ "squash",
50
+ "rebase"
51
+ ]
52
+ }
53
+ }
54
+ ],
55
+ "bypass_actors": [
56
+ {
57
+ "actor_id": 5,
58
+ "actor_type": "RepositoryRole",
59
+ "bypass_mode": "always"
60
+ }
61
+ ]
62
+ }
@@ -0,0 +1,87 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags: ["v*"]
7
+ pull_request:
8
+
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ test:
18
+ name: Test & lint
19
+ runs-on: ubuntu-24.04
20
+ steps:
21
+ - uses: actions/checkout@v7.0.1
22
+ - uses: astral-sh/setup-uv@v10.3.3
23
+ with:
24
+ python-version: "3.12"
25
+ enable-cache: true
26
+ - name: Install dependencies
27
+ run: uv sync --all-groups --frozen
28
+ - name: Check formatting
29
+ run: uv run ruff format --check src tests
30
+ - name: Lint
31
+ run: uv run ruff check src tests
32
+ - name: Test
33
+ run: uv run pytest --cov=mcp_server_docker --cov-report=term-missing --cov-fail-under=90
34
+
35
+ integration:
36
+ name: Integration tests
37
+ needs: test
38
+ runs-on: ubuntu-24.04
39
+ steps:
40
+ - uses: actions/checkout@v7.0.1
41
+ - uses: docker/setup-buildx-action@v4.4.1
42
+ - uses: astral-sh/setup-uv@v10.3.3
43
+ with:
44
+ python-version: "3.12"
45
+ enable-cache: true
46
+ - name: Install dependencies
47
+ run: uv sync --all-groups --frozen
48
+ - name: Run integration tests
49
+ run: uv run pytest -o addopts= -m integration
50
+
51
+ docker:
52
+ name: Docker image
53
+ needs: test
54
+ runs-on: ubuntu-24.04
55
+ permissions:
56
+ contents: read
57
+ packages: write
58
+ steps:
59
+ - uses: actions/checkout@v7.0.1
60
+ - uses: docker/setup-buildx-action@v4.4.1
61
+ - name: Log in to GHCR
62
+ if: startsWith(github.ref, 'refs/tags/v')
63
+ uses: docker/login-action@v4.8.0
64
+ with:
65
+ registry: ghcr.io
66
+ username: ${{ github.actor }}
67
+ password: ${{ secrets.GITHUB_TOKEN }}
68
+ - name: Extract metadata
69
+ id: meta
70
+ uses: docker/metadata-action@v6.2.0
71
+ with:
72
+ images: ghcr.io/${{ github.repository }}
73
+ tags: |
74
+ type=semver,pattern={{version}}
75
+ type=semver,pattern={{major}}.{{minor}}
76
+ type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
77
+ type=ref,event=branch
78
+ type=ref,event=pr
79
+ - name: Build and push
80
+ uses: docker/build-push-action@v7.4.0
81
+ with:
82
+ context: .
83
+ push: ${{ startsWith(github.ref, 'refs/tags/v') }}
84
+ tags: ${{ steps.meta.outputs.tags }}
85
+ labels: ${{ steps.meta.outputs.labels }}
86
+ cache-from: type=gha
87
+ cache-to: type=gha,mode=max
@@ -0,0 +1,127 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*"]
6
+
7
+ # Never cancel a release half-way: a cancelled publish leaves a version on PyPI
8
+ # that cannot be reused.
9
+ concurrency:
10
+ group: ${{ github.workflow }}-${{ github.ref }}
11
+ cancel-in-progress: false
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ test:
18
+ name: Test & lint
19
+ runs-on: ubuntu-24.04
20
+ steps:
21
+ - uses: actions/checkout@v7.0.1
22
+ - uses: astral-sh/setup-uv@v10.3.3
23
+ with:
24
+ python-version: "3.12"
25
+ enable-cache: true
26
+ - name: Install dependencies
27
+ run: uv sync --all-groups --frozen
28
+ - name: Check formatting
29
+ run: uv run ruff format --check src tests
30
+ - name: Lint
31
+ run: uv run ruff check src tests
32
+ - name: Test
33
+ run: uv run pytest --cov=mcp_server_docker --cov-report=term-missing --cov-fail-under=90
34
+
35
+ build:
36
+ name: Build distributions
37
+ runs-on: ubuntu-24.04
38
+ steps:
39
+ - uses: actions/checkout@v7.0.1
40
+ - uses: astral-sh/setup-uv@v10.3.3
41
+ with:
42
+ python-version: "3.12"
43
+ enable-cache: true
44
+ - name: Verify the tag matches the package version
45
+ run: |
46
+ tag_version="${GITHUB_REF_NAME#v}"
47
+ code_version="$(sed -n 's/^__version__ = "\(.*\)"$/\1/p' src/mcp_server_docker/_version.py)"
48
+ echo "tag=$tag_version code=$code_version"
49
+ if [ -z "$code_version" ] || [ "$tag_version" != "$code_version" ]; then
50
+ echo "::error::Tag $GITHUB_REF_NAME does not match __version__ '${code_version}' in src/mcp_server_docker/_version.py"
51
+ exit 1
52
+ fi
53
+ - name: Build sdist and wheel
54
+ run: uv build
55
+ - name: Verify wheel contents and metadata
56
+ run: |
57
+ uv run --no-project python - "$GITHUB_REF_NAME" <<'PY'
58
+ import glob
59
+ import sys
60
+ import zipfile
61
+ from email.parser import HeaderParser
62
+
63
+ expected_version = sys.argv[1].removeprefix("v")
64
+ wheel = glob.glob("dist/*.whl")[0]
65
+ archive = zipfile.ZipFile(wheel)
66
+ names = archive.namelist()
67
+
68
+ assert "mcp_server_docker/__init__.py" in names, "package directory missing"
69
+ entry_points = next(n for n in names if n.endswith("entry_points.txt"))
70
+ assert "mcp-server-docker" in archive.read(entry_points).decode()
71
+
72
+ metadata_path = next(n for n in names if n.endswith("METADATA"))
73
+ metadata = HeaderParser().parsestr(archive.read(metadata_path).decode())
74
+ assert metadata["Name"] == "mcp-server-docker-dboeckli", metadata["Name"]
75
+ assert metadata["Version"] == expected_version, metadata["Version"]
76
+ print(f"verified {metadata['Name']} {metadata['Version']}")
77
+ PY
78
+ - name: Upload distributions
79
+ uses: actions/upload-artifact@v4
80
+ with:
81
+ name: dist
82
+ path: dist/
83
+ if-no-files-found: error
84
+
85
+ publish:
86
+ name: Publish to PyPI
87
+ needs: [test, build]
88
+ runs-on: ubuntu-24.04
89
+ environment:
90
+ name: pypi
91
+ url: https://pypi.org/p/mcp-server-docker-dboeckli
92
+ permissions:
93
+ id-token: write
94
+ steps:
95
+ - uses: actions/download-artifact@v4
96
+ with:
97
+ name: dist
98
+ path: dist/
99
+ - name: Publish
100
+ uses: pypa/gh-action-pypi-publish@release/v1
101
+ with:
102
+ packages-dir: dist/
103
+
104
+ release:
105
+ name: GitHub release
106
+ needs: publish
107
+ runs-on: ubuntu-24.04
108
+ permissions:
109
+ contents: write
110
+ steps:
111
+ - uses: actions/download-artifact@v4
112
+ with:
113
+ name: dist
114
+ path: dist/
115
+ - name: Create or update the release with the distributions attached
116
+ env:
117
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118
+ GH_REPO: ${{ github.repository }}
119
+ run: |
120
+ if gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1; then
121
+ gh release upload "$GITHUB_REF_NAME" dist/* --clobber
122
+ else
123
+ gh release create "$GITHUB_REF_NAME" dist/* \
124
+ --verify-tag \
125
+ --generate-notes \
126
+ --title "$GITHUB_REF_NAME"
127
+ fi
@@ -0,0 +1,21 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ # IDEs
13
+ .idea/
14
+
15
+ # Test / coverage artifacts
16
+ .coverage
17
+ htmlcov/
18
+
19
+ # Superpowers planning artifacts
20
+ .superpowers/
21
+ docs/superpowers/
@@ -0,0 +1 @@
1
+ 3.12.16
@@ -0,0 +1,30 @@
1
+ FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim@sha256:e5b65587bce7de595f299855d7385fe7fca39b8a74baa261ba1b7147afa78e58 AS uv
2
+
3
+ WORKDIR /app
4
+
5
+ ENV UV_COMPILE_BYTECODE=1
6
+
7
+ # Copy from the cache instead of linking since it's a mounted volume
8
+ ENV UV_LINK_MODE=copy
9
+
10
+ COPY uv.lock pyproject.toml /app/
11
+ RUN --mount=type=cache,target=/root/.cache/uv \
12
+ uv sync --frozen --no-install-project --no-dev --no-editable
13
+
14
+ COPY ./src /app/src
15
+ COPY README.md ./README.md
16
+ COPY LICENSE LICENSE
17
+ RUN --mount=type=cache,target=/root/.cache/uv \
18
+ uv sync --frozen --no-dev --no-editable
19
+
20
+ FROM python:3.12.16-slim-bookworm@sha256:935c3c5b12357a7e10caa9c1e6ca5692344d97cf229832ef584be2cec9fc03df
21
+
22
+ WORKDIR /app
23
+
24
+ COPY --from=uv --chown=app:app /app/.venv /app/.venv
25
+
26
+ # Ensure executables in the venv take precedence over system executables
27
+ ENV PATH="/app/.venv/bin:$PATH"
28
+
29
+ # when running the container, add --db-path and a bind mount to the host's db file
30
+ ENTRYPOINT ["mcp-server-docker"]