Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

fix(devcontainer): install Compose v2 from upstream binary release (#370)

Beenu Arora2d0d275f91e5
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 47457d386..7f8e3e696 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -37,10 +37,31 @@ RUN apt-get update \
ca-certificates curl gnupg2 lsb-release software-properties-common \
python3.11 python3.11-venv python3-pip pipx \
build-essential libffi-dev libssl-dev \
- docker.io docker-compose-plugin \
+ docker.io \
ripgrep jq \
&& rm -rf /var/lib/apt/lists/*
+# ─── Docker Compose v2 (CLI plugin) ─────────────────────────────────────────
+#
+# Debian Bookworm's `docker.io` package ships Docker CE 20.x but **not** the
+# v2 `compose` CLI plugin (that lives in Docker's own apt repo only). The
+# AiSOC dev workflow — `aisoc-cli ops up`, `docker compose -f
+# infra/compose/docker-compose.dev.yml ...` — calls `docker compose`, so we
+# install the official plugin binary into the standard CLI-plugins path that
+# the docker CLI auto-discovers.
+ARG COMPOSE_VERSION=v2.29.7
+RUN set -eux; \
+ case "$(dpkg --print-architecture)" in \
+ amd64) compose_arch="x86_64" ;; \
+ arm64) compose_arch="aarch64" ;; \
+ *) echo "unsupported arch $(dpkg --print-architecture)" >&2; exit 1 ;; \
+ esac; \
+ mkdir -p /usr/local/lib/docker/cli-plugins; \
+ curl -fsSL "https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-linux-${compose_arch}" \
+ -o /usr/local/lib/docker/cli-plugins/docker-compose; \
+ chmod +x /usr/local/lib/docker/cli-plugins/docker-compose; \
+ /usr/local/lib/docker/cli-plugins/docker-compose version
+
# ─── GitHub CLI (gh) ────────────────────────────────────────────────────────
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
| gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg \
diff --git a/.github/workflows/devcontainer-build.yml b/.github/workflows/devcontainer-build.yml
index 37ffffb99..98bf21696 100644
--- a/.github/workflows/devcontainer-build.yml
+++ b/.github/workflows/devcontainer-build.yml
@@ -26,6 +26,18 @@ on:
- '.devcontainer/Dockerfile'
- '.devcontainer/devcontainer.json'
- '.github/workflows/devcontainer-build.yml'
+ # Build (but do not push) on PRs that touch the devcontainer surface, so we
+ # catch Dockerfile breakage before it lands on main. Without this, a typo in
+ # the Dockerfile only fails after merge — which is what happened in #368,
+ # leaving the devcontainer-build workflow red on main until the follow-up
+ # fix shipped. The post-merge push job remains the only thing that publishes
+ # to GHCR.
+ pull_request:
+ branches: [main]
+ paths:
+ - '.devcontainer/Dockerfile'
+ - '.devcontainer/devcontainer.json'
+ - '.github/workflows/devcontainer-build.yml'
schedule:
- cron: '0 9 * * 1' # Mondays 09:00 UTC — base image hygiene
workflow_dispatch:
@@ -75,7 +87,10 @@ jobs:
with:
context: .devcontainer
file: .devcontainer/Dockerfile
- push: true
+ # Only push when the trigger is on main (push / schedule /
+ # workflow_dispatch). PR builds verify the Dockerfile compiles but
+ # never publish a `:latest` tag from an unmerged change.
+ push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}