Easily build and run a Pocketbase Docker Linux container within your .NET Aspire projects.
This uses a configurable Dockerfile mentioned in the Pocketbase docs.
- .NET 9 SDK
- Container image builder for Dockerfiles
Pocketspire on nuget.org
Add the NuGet package and then the extension method to your AppHost:
using Pocketspire;
var builder = DistributedApplication.CreateBuilder(args);
var pocketbase = builder.AddPocketbaseContainer("pb");
// ...Superuser credentials are required for initial setup but a link will also generate in the console for use during first-time setup. See the pocketbase docs for more details.
- name: The name of the instance. Appends to the name like: "pocketbase-{name}".
- superUserEmail: The email for the super user.
- superUserPassword: The password for the super user.
- arm64cpu (optional): Use an ARM64 CPU. Default is
false. - exposedPort (optional): The port to be exposed. Default is
null. - pocketbaseVersion (optional): The version of PocketBase to use. Default is
"0.24.1".

