I want to run some powershell script every time my container starts which modifies password for local admin account and modifies some IIS settings unique to container host.
I use “microsoft/iis” image which already specifies “CMD” parameter and it’s needed for image to run. So how do I run my custom script during container startup and pass some ENV parameters to it to modify container runtime.
You should probably override the CMD of the iis base image. You can either string together commands with ; or include a .ps1 script that does both what you need and then does what the iis image already does.
How do I pass arguments to my custom command in such cases? I want to pass some environment variables from container host to container image during startup
So how my DOCKER will will look like if I go with multiple command in CMD statement. Default IIS images has “c:\servicemonitor w3svc” command.
My docker file is below
I’m trying to add those to to container but they seemed not be added after “EntryPoint” command for container image. Microsoft/IIS specifies “c:\servicemonitor.exe w3svc” as EntryPoint. So when I add “CMD” to docker file it seems to be appended directly after entry point and hence never exececuted. Do I need to modify EntryPoint instead?