Deploy Aspire applications to remote Docker hosts via SSH.
This package extends Aspire's Docker Compose support with a deployment pipeline that builds container images locally, pushes them to a registry, and deploys to a remote server via SSH. The pipeline handles SSH connection management, file transfers, and container orchestration with docker compose.
flowchart LR
A[Dev Machine / CI<br/>aspire deploy] -->|SSH| B[Target Server<br/>docker compose up]
- Add the package feed:
dotnet nuget add source https://f.feedz.io/davidfowl/aspire/nuget/index.json --name davidfowl-aspire- Install the package:
aspire add docker-sshdeployOr with the .NET CLI:
dotnet add package Aspire.Hosting.Docker.SshDeploy --prerelease- Add SSH deployment support to your AppHost:
builder.AddDockerComposeEnvironment("env")
.WithSshDeploySupport();- Deploy:
aspire deployThe pipeline will prompt for SSH credentials, registry configuration, and deploy path.
See the package README for:
- Configuration options (
appsettings.json, environment variables) - SSH authentication (key-based vs password)
- Target host privacy settings
See samples/DockerPipelinesSample for a complete example:
aspire run # Run locally
aspire deploy # Deploy to remote hostSee .github/workflows/deploy.yml for a complete example using GitHub Container Registry with secrets for SSH credentials.