Skip to content

Commit 049e68e

Browse files
committed
make opa relative
1 parent 09c7db6 commit 049e68e

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

m365/image/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ RUN Initialize-SCuBA -Scope AllUsers -NoOPA
2525
COPY run_container.ps1 .
2626

2727
# manually install OPA, grant ContainerUser execute permissions, then switch to user
28-
ENV OPA_PATH="C:\app\opa_windows_amd64.exe"
29-
RUN $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://openpolicyagent.org/downloads/v$($Env:OPA_VERSION)/opa_windows_amd64.exe -OutFile $Env:OPA_PATH -UseBasicParsing
30-
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 }
31-
RUN icacls.exe $env:OPA_PATH /grant 'User Manager\ContainerUser:RX'
28+
ENV OPA_NAME="opa_windows_amd64.exe"
29+
RUN $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -Uri https://openpolicyagent.org/downloads/v$($Env:OPA_VERSION)/opa_windows_amd64.exe -OutFile $Env:OPA_NAME -UseBasicParsing
30+
RUN if ((Get-FileHash $Env:OPA_NAME -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 }
31+
RUN icacls.exe $env:OPA_NAME /grant 'User Manager\ContainerUser:RX'
3232
USER ContainerUser
3333

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

m365/image/run_container.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Foreach ($tenantConfig in $(Get-ChildItem 'input\')) {
4040
AppID = $Env:APP_ID; # App ID; Needed for Service Principal Auth
4141
Organization = $org; # primary domain of the tenantConfig needed for Service Principal Auth
4242
OutPath = ".\reports\$($org)"; # The folder path where the output will be stored
43-
OPAPath = "C:\apps"
43+
OPAPath = "."
4444
ConfigFilePath = $tenantConfig.FullName
4545
Quiet = $true;
4646
}

0 commit comments

Comments
 (0)