microsoft / microsoft/aspire

[CLI] Add `pull` to aspire cli tool

Open
#16,697 0 comments 0 reactions 0 assignees View on GitHub
area-cli
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

I'd like to see the Aspire CLI include a `pull` command to enable pulling down/ updating the required images locally, in much the same way `docker pull {image}:{tag}` does for specific images, or `docker compose pull` does for `docker-compose.y{a}ml` files.

```csharp
var sqlServer = builder
.AddAzureSqlServer("sqlserver")
.RunAsContainer(container =>
container.WithImage(Platform.ContainerDetails.MsSqlImage).WithDataVolume()
);
```

In this example it would pull down the image defined in the `WithImage` method.

### Describe the solution you'd like

```bash
> aspire pull --help

Description:
Pulls the latest versions of any Docker images used for in the AppHost

Usage:
aspire pull [options] [[--] ...]]

Options:
--apphost The path to the Aspire apphost project file
--summary Output format for pull results
-?, -h, --help Show help and usage information
-l, --log-level Set the minimum log level for console output (Trace, Debug, Information, Warning, Error, Critical)
--nologo Suppress the startup banner and telemetry notice
--banner Display the animated Aspire CLI welcome banner
```

### Additional context

The reason this is useful is not only ensuring the 'latest' version when people rely on the `:latest` tag, but primarily for when people are traveling and have little or no access to a stable internet connection. Enabling this feature would allow them to, much like a `git pull`, resolve the latest dependencies locally prior to travelling.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.