Aspire.Hosting.SqlServer v9.5.2 causes Permissions error on Apple Silicon device
- 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
### Describe the bug
OS: macOS 15.7.1
Processor: Apple M4
Possibly related to this issue from earlier in the year:
https://github.com/dotnet/aspire/issues/7182
With v9.5.2 of the Aspire.Hosting.SqlServer package installed on my project, I'm seeing Permission Denied errors with the following in my AppHost:
```csharp
var sqlServer = builder.AddSqlServer ("sql", password: sqlPassword)
.WithLifetime (ContainerLifetime.Persistent)
.WithDataVolume ();
```
If I remove the .WithDataVolume() call, it works fine - so must be something to do with the mounts?
Attached is the full console log showing the errors when trying to run the image.
If I downgrade the package to v9.5.1 it works, though interestingly it's then using the sqlserver2025 image instead of the 2022 version used by 9.5.2.
### Expected Behavior
The SQL server image will run in Docker and I can be on my merry way.
### Steps To Reproduce
0. Use an Apple M4 device (I'm on a Mac Mini M4)
1. In an Aspire project, add the Aspire.Hosting.SqlServer package, v9.5.2
2. In AppHost, configure to use SqlServer with the following:
```csharp
var sqlServer = builder.AddSqlServer ("sql", password: sqlPassword)
.WithLifetime (ContainerLifetime.Persistent)
.WithDataVolume ();
```
3. Run the project.
4. The `sql` resource failes to start.
### Exceptions (if any)
See the log file from running the Docker image: [sql-766b6e3e-20251106105713.txt](https://github.com/user-attachments/files/23400346/sql-766b6e3e-20251106105713.txt)
### .NET Version info
.NET 9.0.202
### Anything else?
You can workaround this issue by downgrading to v9.5.1 of the Aspire.Hosting.SqlServer package. Though, that then uses the SQL Server 2025 image, whereas 9.5.2 is trying to use SQL Server 2022.
Contributor guide
Research direction
Start from the AppHost configuration using Aspire.Hosting.SqlServer v9.5.2 and WithDataVolume(), then reproduce the failure on an Apple M4 with the attached Docker log. Compare the image and volume behavior with v9.5.1; the issue is done when the SQL Server image starts successfully with a persistent data volume on Apple Silicon.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, docker, sql
- Domain
- databases, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100