Skip to content

Commit 4199e08

Browse files
committed
single quotes for icacls; try speeding up invoke-webrequest
1 parent 24ca616 commit 4199e08

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

m365/image/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LABEL scubagear_version=${SCUBAGEAR_VERSION}
1313
WORKDIR /app
1414

1515
# download azcopy exe to workdir
16-
RUN Invoke-WebRequest -Uri $Env:AZCOPY_URL -OutFile AzCopy.zip -UseBasicParsing
16+
RUN $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri $Env:AZCOPY_URL -OutFile AzCopy.zip -UseBasicParsing
1717
RUN Expand-Archive .\AzCopy.zip ./AzCopy -Force
1818
RUN $item = Get-ChildItem .\AzCopy\*\azcopy.exe; Move-Item -Path $item -Destination .
1919
RUN Remove-Item AzCopy.zip; Remove-Item -r .\AzCopy
@@ -25,9 +25,9 @@ RUN Initialize-SCuBA -Scope AllUsers -NoOPA
2525
COPY run_container.ps1 .
2626

2727
ENV OPA_PATH="C:\app\opa_windows_amd64.exe"
28-
RUN Invoke-WebRequest -Uri https://openpolicyagent.org/downloads/v$($Env:OPA_VERSION)/opa_windows_amd64.exe -OutFile $Env:OPA_PATH -UseBasicParsing
28+
RUN $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://openpolicyagent.org/downloads/v$($Env:OPA_VERSION)/opa_windows_amd64.exe -OutFile $Env:OPA_PATH -UseBasicParsing
2929
RUN if ((Get-FileHash $Env:OPA_PATH -Algorithm SHA256).Hash -ne ([System.Text.Encoding]::ASCII.GetString((Invoke-WebRequest -Uri https://openpolicyagent.org/downloads/v$($Env:OPA_VERSION)/opa_windows_amd64.exe.sha256 -UseBasicParsing).Content) -split ' ')[0]) { exit 1 }
30-
RUN icacls.exe $env:OPA_PATH /grant "User Manager\ContainerUser":RX
30+
RUN icacls.exe $env:OPA_PATH /grant 'User Manager\ContainerUser':RX
3131
USER ContainerUser
3232

3333
CMD [ "powershell", ".\\run_container.ps1" ]

0 commit comments

Comments
 (0)