Windows Containers


Parameterizing web.config, etc.


In the web.config of a given ASP.NET app, the a connection string is often hardcoded. How can this be parameterized such that we can maintain a single image, but pass DB server name, DB name, and credentials to the container at docker
run time?
I was thinking of adding a PS script to the image which gets invoked via CMD or ENTRYPOINT,
and have that script accept parameters from docker run, which
would update web.config.
Just curious as to what best practice is here. I have similar concerns for the registry, SSL certificates, etc.
Environment variables when you launch container.
I would got with enviroment variables set in the dockerfile, this way when you call the script in the ENTRYPOINT or in the final CMD file you will be able to push the variables just set. I think worth the case to look at the way the MSSQL images are create
in github to get a good idea.
https://github.com/Microsoft/mssql-docker/blob/master/windows/mssql-server-windows-developer/dockerfile
I would got with enviroment variables set in the dockerfile, this way when you call the script in the ENTRYPOINT or in the final CMD file you will be able to push the variables just set. I think worth the case to look at the way the MSSQL images are create
in github to get a good idea.
https://github.com/Microsoft/mssql-docker/blob/master/windows/mssql-server-windows-developer/dockerfile
My understanding the point to make this to be runtime variable which will not be accessible anywhere outside of running environment. If you put them it in docker file it bakes this into the image.
I'm not exactly sure what your goal is, so if you can describe that a bit more that would help.
Here are some resources in the meantime:
http://stackoverflow.com/questions/30494050/how-to-pass-environment-variables-to-docker-containers
http://staxmanade.com/2016/05/how-to-get-environment-variables-passed-through-docker-compose-to-the-containers/
https://github.com/docker/docker/issues/240
https://docs.docker.com/docker-cloud/getting-started/deploy-app/6_define_environment_variables/#environment-variables-and-the-dockerfile
https://docs.docker.com/compose/environment-variables/#the-envfile-configuration-option

Related Links

Virtualbox not works after install Docker
Nanoserver container not working with TP5
DTC in container
problems with mount full driver for the container
Does anybody ssh to a windows container?
Windows container docker pull fails.
Error Looking at Container Network.
how to call the docker daemon in Azure VM Windows Server 2016 TP5 from a client docker on windows 10
Github container example for apache produces non-zero code 255 on TP5
TP5 Unable to run windowsservercore with docker native command
Hyper-V Error - the operation cannot be performed while the object is in its current state
Remote debugging of C++ applications using visual studio inside container
Static IP Addresses: Constraints related to NAT networks
Can I do anything right now to get Visual Studio to deploy to a windows container?
Get-EventLog inside container - InvalidOperationException
Trouble Collection TP 5

Categories

MSDN
Windows Phone Dev Center
Apps for Office and Sh...
Microsoft Sync Framework
SQL Server
SQL Server (Pre-release)
Orchard
Windows Hardware Devel...
Visio 2010
Silverlight
Archived Forums N-R
Maps In Windows
Forums Issues (not pro...
Visual Basic
Visual Studio LightSwi...
Testing with Visual St...
Visual Studio Graphics...
Register and Manage Ac...
Store Engagement Frame...
Windows Desktop Optica...
Windows Filtering Plat...
SharePoint 2013 - Setu...
SharePoint 2010 - Search
Cloud Services (Web an...
Azure Active Directory
Azure Log Analytics
StorSimple
Azure Blockchain
.NET Framework Class L...
Claims based access pl...
Visual Studio Visualiz...
BizTalk Server RFID
WCF Data Services
XML, System.Xml, MSXML...
HealthVault Developer
Microsoft Translator H...
Microsoft Robotics - H...
SQL Server Reporting S...
SQL Server Analysis Se...
Transact-SQL
SQL Server Data Access
SQL Server Compact
Standard 2009: Tools
SQL Server 2012 Spatia...
ClickOnce and Setup & ...
Windows Live Messenger...
Windows Live ID: Devel...
CRM Development
MSDN Subscriptions Fee...
MSDN and TechNet Searc...
Speech Service for Dev...
Office Live Basics, Es...
Silverlight 5
Getting Started with S...
Silverlight Video and ...
Retired SharePoint Bus...
.NET Remoting and Runt...
Azure Troubleshooting,...
CHESS – Find and Repro...
Core Coding Experience...
Doloto
Feedback for Visual Ba...
General Troubleshootin...
Microsoft Unified Comm...
Model-Based Testing wi...
Network Class Library ...
Network Quality of Ser...
Pex and Moles PowerTool
Project Codename:  Jasper
Search Server: Known B...
Search, Organize, and ...
Silverlight (formerly ...
Silverlight (formerly ...
Security for Azure
Share your How to samp...
Software Transactional...
SyncFx - Microsoft Syn...
SQL Server 2014 In Azu...
Visual Basic Interop a...
Visual Studio Team Ser...
Visual Studio Tools fo...
Web Gadget Development
Windows Developer Prev...
Windows Events
Windows Live Search: D...
Windows Workflow Found...
Windows XP Wireless SDK
Expression Blend for W...
Windows Phone push not...
XML Paper Specificatio...
Skype Web SDK
Windows Containers
Microsoft R Server

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile