From 293687c6fdb6ed53317ba48a4e4388d81b0dd98c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 19 Sep 2026 19:33:32 +0000 Subject: [PATCH 1/2] Initial plan From 914bef2cc8e1b6aec1937d10bf73e5081599fb6c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 19 Sep 2026 19:39:50 +0000 Subject: [PATCH 2/2] docs: clarify local container builds and OS mode for aspire deploy Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com> --- .../reference/cli/commands/aspire-deploy.mdx | 10 ++++++++ .../unit/cli-container-builds.vitest.test.ts | 24 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 src/frontend/tests/unit/cli-container-builds.vitest.test.ts diff --git a/src/frontend/src/content/docs/reference/cli/commands/aspire-deploy.mdx b/src/frontend/src/content/docs/reference/cli/commands/aspire-deploy.mdx index 578f53ae0..1f4a37e84 100644 --- a/src/frontend/src/content/docs/reference/cli/commands/aspire-deploy.mdx +++ b/src/frontend/src/content/docs/reference/cli/commands/aspire-deploy.mdx @@ -33,6 +33,16 @@ The command performs the following steps to deploy an app orchestrated with Aspi - Starts the AppHost and its resources. - Executes the `deploy` pipeline step, and any dependent steps, registered in the app model. +### Local container image builds + +When your deployment pipeline containerizes a .NET project, the .NET container build step builds the image locally on the machine running `aspire deploy`, before the image is pushed to a registry or deployed to the target environment. + +:::caution[Match the container OS] +When the build uses your local container runtime, its OS mode must match the OS of the image configured for the resource in your AppHost: Linux containers for Linux images, or Windows containers for Windows images. This is the container runtime's mode, not necessarily your host operating system. + +On Windows, if your AppHost targets Linux images, select **Switch to Linux containers** from the Docker Desktop menu before running `aspire deploy`. Leaving Docker Desktop in Windows containers mode can cause the local image build to fail, even when the deployment target runs Linux. +::: + ## Pipeline summary output After the pipeline finishes, `aspire deploy` prints a result summary and a step-by-step breakdown. The summary shows how many steps succeeded, the total pipeline duration, and a `Steps Summary:` table. diff --git a/src/frontend/tests/unit/cli-container-builds.vitest.test.ts b/src/frontend/tests/unit/cli-container-builds.vitest.test.ts new file mode 100644 index 000000000..4739b50aa --- /dev/null +++ b/src/frontend/tests/unit/cli-container-builds.vitest.test.ts @@ -0,0 +1,24 @@ +import { readFileSync } from 'node:fs'; +import { describe, expect, test } from 'vitest'; + +const source = readFileSync( + new URL('../../src/content/docs/reference/cli/commands/aspire-deploy.mdx', import.meta.url), + 'utf8', +); + +describe('CLI deployment container prerequisites', () => { + test('explains that .NET container images are built locally before deployment', () => { + expect(source).toMatch(/\.NET container build step[^.\n]*locally[^.\n]*`aspire deploy`/); + }); + + test('warns about matching the container runtime OS and switching Docker Desktop mode', () => { + const caution = source.match(/:::caution\[Match the container OS\]\n([\s\S]*?)\n:::/)?.[1]; + + expect(caution).toBeDefined(); + expect(caution).toMatch(/OS mode must match[^.\n]*AppHost/); + expect(caution).toContain('Linux containers for Linux images'); + expect(caution).toContain('Windows containers for Windows images'); + expect(caution).toContain('Docker Desktop'); + expect(caution).toContain('Switch to Linux containers'); + }); +});