I am using Windows docker with a Windows container.
I am starting a container in interactive mode so that I can run some powershell scripts to enable remote iis management. I've tried to add these scripts to my dockerfile to incorporate them in the image, but they don't seem to stick unless I run them in powershell after the container is running.
I am starting the container with
docker run -it --rm --name mycontainer --entrypoint powershell myimage
Then if I try to commit it after making the changes I need, I get an error about not being able to commit a running container on windows. So I stop the container
docker stop mycontainer
And then when I look for the container to commit it is gone. I believe it is something to do with running it with the -it parameter.
Is there any way to get powershell access to the container, make changes, and then commit the container to a new image containing the changes I made?