RUN Powershell Script in Docker Container From Host Powershell Script

Question:

I have a powershell script in host which copy some files and starts the container.

Second last command executes fine but last command will only execute when I exit the container session and returns error(File Not Found which is because it finds that file on host)

Question: Is there anyway I can execute the command in container session from the script. Or execute any command from script in any process(confused)

Any help is appreciated.

Thanks

Answer:

Do not use the -ti flags to start an interactive session, just execute the script directly via the docker exec command

Source:

RUN Powershell Script in Docker Container From Host Powershell Script by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply