SqlServer container rebuilt every run using WithDockerfile(..) and .WithLifetime(ContainerLifetime.Persistent) #8278
Unanswered
MiniGuinea
asked this question in
Q&A
Replies: 1 comment
-
cc @danegsta |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a similiar issue to this (#6928) where my SqlServer container isn't destroyed when I stop AppHost but when I restart AppHost a new docker image gets created and the container is destroyed and recreated.
This is the code I use to create the container
I am able to get my data persisting between runs by using
.WithDataVolume("sql-data")
but my app takes a significant time to start up because the container keeps getting thrown away at the beginning of each run.The docker file is used to deploy a .bacpac to SqlServer when the container starts up to set up the database (following steps from here #5530)
I am running Docker Desktop 4.39.0 and .net SDK 9.0.201
Any help would be appreciated thanks.
Beta Was this translation helpful? Give feedback.
All reactions