-
Notifications
You must be signed in to change notification settings - Fork 216
/
Copy pathDockerfile
18 lines (14 loc) · 934 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# escape=`
ARG BASE_IMAGE
ARG ASSETS_IMAGE
FROM $ASSETS_IMAGE as assets
FROM $BASE_IMAGE as build
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# copy tools and config
COPY --from=assets ["C:\\install\\tools\\", "C:\\inetpub\\wwwroot\\temp\\install\\tools\\"]
COPY .\\config\\production C:\\inetpub\\wwwroot\\Config\\production\\
# find transform files and do transformation
RUN $xdts = [System.Collections.ArrayList]@(); `
$xdts.AddRange(@(Get-ChildItem -Path 'C:\\inetpub\\wwwroot\\Config\\production\\*.xml.xdt' -Recurse)); `
$xdts | ForEach-Object { & 'C:\\inetpub\\wwwroot\\temp\\install\\tools\\scripts\\Invoke-XdtTransform.ps1' -Path $_.FullName.Replace('.xdt', '') -XdtPath $_.FullName -XdtDllPath 'C:\\inetpub\\wwwroot\\temp\\install\\tools\\bin\\Microsoft.Web.XmlTransform.dll'; }; `
$xdts | ForEach-Object { Remove-Item -Path $_.FullName; };