Microsoftgraph Docker Image problem - GitLab pipeline #3129
Unanswered
ScatchyMonkey
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi - I'm referencing the latest Docker image,
mcr.microsoft.com/microsoftgraph/powershell
from a local container registry in a GitLab CICD pipeline to allow me to issue various Graph SDK commands as part of some Entra automation I'm building.The GitLab Runner is a Kubernetes executor and exposes a cut-down Linux environment (no sudo!) to run the PowerShell code in the pipeline, but the process is restricted from accessing administrative folders in that Linux OS for security purposes. Additionally, while Entra's Graph API is accessible, general internet access from GitLab is blocked, again for security purposes.
While the pipeline successfully triggers the Docker image's installation of 'base' PowerShell modules into the
/opt/Microsoft/powershell/7/Modules
folder, theMicrosoft.Graph
module itself is instead installed into the administrative/root/.local/share/powershell/Modules
folder. The upshot of this behaviour is that the pipeline isn't able to reference theMicrosoft.Graph
module at all (I'm not even sure if it even had permissions to install it in the first place).To help clarify, this pipeline output shows the location that those 'base' modules are installed to:
While this shows the output from a subsequent search for the
Microsoft.Graph
module file, where various locations are prevented from being searched, including the'/root'
folder:My questions are :
Note: image:entrypoint doesn't work, it just changes the 'working directory' of the pipeline, not the installation location of the image into Linux.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions