title: Windows - Docker CMD does not execute
body: <p>For the life of me, I cannot seem to get my provisioning script to execute when I run my container. Down the road, I will need to pass in arguments to the docker run command to replace 'hiiii' and '123' for multiple container deployments.</p>
  
  <p>This is my docker file</p>
  
  <pre><code>FROM microsoft/aspnet:3.5-windowsservercore-10.0.14393.1198
  
  SHELL [“powershell”, “-Command”, “$ErrorActionPreference = ‘Stop’; $ProgressPreference = ‘SilentlyContinue’;”]
  
  COPY *.ps1 /Container/
  
  COPY [“wwwroot”, “/inetpub/wwwroot”]
  COPY [“Admin”, “/Program Files (x86)Admin”]
  COPY [“Admin/web.config”, “/Program Files (x86)/Admin/web_default.config”]
  
  #ENTRYPOINT [“powershell”]
  CMD [“powershell.exe”, -NoProfile, -File, C:\Container\Start-Admin.Docker.Cmd.ps1 -Parm1 ‘Hiiii’ -parm2 ‘123’]
  </code></pre>
  
  <p>I have also tried the shell version of CMD as follows</p>
  
  <pre><code>CMD powershell -NoProfile -File C:\Container\Start-Admin.Docker.Cmd.ps1 -Parm1 ‘Hiiii’ -Parm2 ‘123’
  </code></pre>
  
  <p>This is the command I am using.</p>
  
  <pre><code>docker image build -t image:v1:v1 .
  docker run --name container -p 8001:80 -d image:v1
  </code></pre>
  
  <p>After I create and run the container I see that the script did not run, or failed. However, I can exec into powershell on the container and run the script manually and it works fine and I see all the changes that I need.</p>
  
  <pre><code>docker exec --interactive --tty container powershell
  C:\Container\Start-Admin.Docker.Cmd.ps1 -Parm1 ‘Hiiii’ -Parm2 ‘123’
  </code></pre>
  
  <p>I am just at a loss as to what I am missing regarding CMD.</p>
  
  <p>Thanks!</p>