C
C#13mo ago
ghoulam

❔ ✅ Hand the connection string to a container

Hi, I have an asp.net core webapi that I pushed to docker hub and as a logical thing you want put the connection string in there but the question is how to give that info to the container when I launch it?
4 Replies
ghoulam
ghoulam13mo ago
Maybe in a simpler way : if I keep the "Appsettings.json" file for myself how to ship it to the container when I start it?
Nergy101
Nergy10113mo ago
Look up how to use docker environment variables
ghoulam
ghoulam13mo ago
fixed by adding this to my docker-compose file :
environment:
- CONNECTION_STRING=connection string value
environment:
- CONNECTION_STRING=connection string value
Accord
Accord13mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.