diff --git a/windows/9.x.x/sitecore-sxa-jss/Dockerfile b/windows/9.x.x/sitecore-sxa-jss/Dockerfile index 48d7a6563..0534fa736 100644 --- a/windows/9.x.x/sitecore-sxa-jss/Dockerfile +++ b/windows/9.x.x/sitecore-sxa-jss/Dockerfile @@ -12,16 +12,18 @@ ARG ASSETS_USE_WDP COPY --from=assets ["${ASSETS_USE_WDP}", "C:\\temp\\packages\\"] # expand selected wdp, inlcuding .xdt transformation files from the SCCPL package (`Expand-Archive` command needs it to be renamed to .zip file), into installation directory -RUN Expand-Archive -Path 'C:\\temp\\packages\\*.zip' -DestinationPath 'C:\\temp'; ` +RUN New-Item -Path 'C:\\temp\\wwwroot' -ItemType Directory | Out-Null; ` + Expand-Archive -Path 'C:\\temp\\packages\\*.zip' -DestinationPath 'C:\\temp'; ` Rename-Item -Path 'C:\\temp\\Content\\Website\\App_Data\\Transforms\\JSSSCCPL.sccpl' -NewName 'JSSSCCPL.sccpl.zip';` Expand-Archive -Path 'C:\\temp\\Content\\Website\\App_Data\\Transforms\\JSSSCCPL.sccpl.zip' -DestinationPath 'C:\\temp\\Content\\Website\\App_Data\\JssXdt';` - Copy-Item -Path 'C:\\temp\\Content\\Website\\*' -Destination 'C:\\inetpub\\wwwroot' -Recurse -Force; + Copy-Item -Path 'C:\\temp\\Content\\Website\\*' -Destination 'C:\\temp\\wwwroot' -Recurse -Force; # copy tools and transforms COPY --from=assets ["C:\\install\\tools\\", "C:\\install\\tools\\"] # find transform files and do transformation -RUN (Get-ChildItem -Path 'C:\\inetpub\\wwwroot\\*.xdt' -Recurse ) | ForEach-Object { & 'C:\\install\\tools\\scripts\\Invoke-XdtTransform.ps1' -Path 'C:\\inetpub\\wwwroot\\web.config' -XdtPath $_.FullName -XdtDllPath 'C:\\install\\tools\\bin\\Microsoft.Web.XmlTransform.dll'; }; +RUN Copy-Item -Path 'C:\\inetpub\\wwwroot\\web.config' -Destination 'C:\\temp\\wwwroot' -Force; ` + (Get-ChildItem -Path 'C:\\temp\\wwwroot\\*.xdt' -Recurse ) | ForEach-Object { & 'C:\\install\\tools\\scripts\\Invoke-XdtTransform.ps1' -Path 'C:\\temp\\wwwroot\\web.config' -XdtPath $_.FullName -XdtDllPath 'C:\\install\\tools\\bin\\Microsoft.Web.XmlTransform.dll'; }; FROM $BASE_IMAGE @@ -29,12 +31,12 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref ARG SC_ROLE_DEFINE -COPY --from=build ["C:\\inetpub\\wwwroot\\", "C:\\inetpub\\wwwroot\\"] +COPY --from=build ["C:\\temp\\wwwroot\\", "C:\\inetpub\\wwwroot\\"] # copy Node.JS installer COPY --from=assets ["C:\\install\\setup\\node.msi", "C:\\inetpub\\wwwroot\\temp\\install\\setup\\node.msi"] RUN $env:INSTALL_TEMP = 'C:\\inetpub\\wwwroot\\temp\\install'; ` -# setup Node.JS for Experience Editor on CM and for Integrated Mode on CD -Start-Process msiexec.exe -ArgumentList '/i', (Join-Path $env:INSTALL_TEMP '\\setup\\node.msi'), '/quiet', '/norestart' -NoNewWindow -Wait;` -Remove-Item -Path $env:INSTALL_TEMP -Force -Recurse; + # setup Node.JS for Experience Editor on CM and for Integrated Mode on CD + Start-Process msiexec.exe -ArgumentList '/i', (Join-Path $env:INSTALL_TEMP '\\setup\\node.msi'), '/quiet', '/norestart' -NoNewWindow -Wait;` + Remove-Item -Path $env:INSTALL_TEMP -Force -Recurse; \ No newline at end of file diff --git a/windows/9.x.x/sitecore-sxa/Dockerfile b/windows/9.x.x/sitecore-sxa/Dockerfile index 8f77f4573..34c90e311 100644 --- a/windows/9.x.x/sitecore-sxa/Dockerfile +++ b/windows/9.x.x/sitecore-sxa/Dockerfile @@ -12,18 +12,19 @@ ARG ASSETS_USE_WDP COPY --from=assets ["${ASSETS_USE_WDP}", "C:\\temp\\packages\\"] # expand selected wdp into installation directory -RUN Expand-Archive -Path 'C:\\temp\\packages\\*.zip' -DestinationPath 'C:\\temp'; ` - Copy-Item -Path 'C:\\temp\\Content\\Website\\*' -Destination 'C:\\inetpub\\wwwroot' -Recurse -Force; +RUN New-Item -Path 'C:\\temp\\wwwroot' -ItemType Directory | Out-Null; ` + Expand-Archive -Path 'C:\\temp\\packages\\*.zip' -DestinationPath 'C:\\temp'; ` + Copy-Item -Path 'C:\\temp\\Content\\Website\\*' -Destination 'C:\\temp\\wwwroot' -Recurse -Force; # copy tools and transforms COPY --from=assets ["C:\\install\\tools\\", "C:\\install\\tools\\"] # find transform files and do transformation -RUN (Get-ChildItem -Path 'C:\\inetpub\\wwwroot\\*.xdt' -Recurse ) | ForEach-Object { & 'C:\\install\\tools\\scripts\\Invoke-XdtTransform.ps1' -Path 'C:\\inetpub\\wwwroot\\web.config' -XdtPath $_.FullName -XdtDllPath 'C:\\install\\tools\\bin\\Microsoft.Web.XmlTransform.dll'; }; +RUN Copy-Item -Path 'C:\\inetpub\\wwwroot\\web.config' -Destination 'C:\\temp\\wwwroot' -Force; ` + (Get-ChildItem -Path 'C:\\temp\\wwwroot\\*.xdt' -Recurse ) | ForEach-Object { & 'C:\\install\\tools\\scripts\\Invoke-XdtTransform.ps1' -Path 'C:\\temp\\wwwroot\\web.config' -XdtPath $_.FullName -XdtDllPath 'C:\\install\\tools\\bin\\Microsoft.Web.XmlTransform.dll'; }; FROM $BASE_IMAGE SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] -COPY --from=build ["C:\\inetpub\\wwwroot\\", "C:\\inetpub\\wwwroot\\"] - +COPY --from=build ["C:\\temp\\wwwroot\\", "C:\\inetpub\\wwwroot\\"] \ No newline at end of file