How to set env variables in Docker reliably

I want to deploy my backend (or really all my programs) using Kubernetes / CircleCI and now im facing the issue of wanting to have my credentials and such set as environment variables for my Image on deploy My current structure is something like: program starts -> generates config files -> reads config files Now with the config files being waited for to get filled in it kinda destroys the point of automatic deployment, and me using SQLite as database doesnt help either considering it would be gone each time TLDR; So how can i reliably pass Environment variables for credentials like that into my Image on deploy
5 Replies
jcotton42
jcotton422mo ago
whatever you're using on the host to run the container should set those env vars
Somgör from Human Resources
how can i pass the arguments into the container from visual studio to test it?
jcotton42
jcotton422mo ago
TIL: Set Docker Environment Variables in Visual Studio for easier d...
Today I learned how to set Docker Environment Variables directly in Visual Studio to ease my debugging experience.
jcotton42
jcotton422mo ago
Safe storage of app secrets in development in ASP.NET Core
Learn how to store and retrieve sensitive information during the development of an ASP.NET Core app.
jcotton42
jcotton422mo ago
provided you're using the .net config system that is the one you get when you make a web api or worker service