Closed Plork closed 6 years ago
Did work a long time ago when Docker for Windows did not handle powershell and exitcodes very well. Please go to https://github.com/pbering/SockerVS2017 or https://github.com/pbering/sitecore-nine-docker for some more up to date usages. This repo is only here for historical reasons :)
Oke thnx, was just wondering ;) Solved it by putting the robocopy stuff in a Powershell wrapper.
Yeah saw the other repo's. But my interest was to get this working during a TeamCity pipeline. So thats why I didn't look at the vs2017 one. But will look at the Dockerfiles to see how things are done.
SC9 is also not an option because we are still on 8.2 ;)
on a sidenote. Awesome work tho ;)
Yeah look into the other Docker file, they are more optimized (minimal amount of layers, DNS tweaks) and thank you for your feedback! :)
How can this work for you?
RUN robocopy ((Resolve-Path -Path "C:\Sitecore\Temp\Sitecore*").Path) 'C:\Sitecore' /E /NP /NFL /NDL /NJH /NJS; \ Remove-Item 'C:\Sitecore\Temp' -Recurse -Force;
Robocopy exits with "1" if a new file is added. The exit 1 will make the docker build fail.