From 17d2b68a4b64391573f9f702ea282224a2b8606a Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Wed, 20 Aug 2025 11:27:13 -0700 Subject: [PATCH 01/14] add --loglevel verbose --- linux/base.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/base.Dockerfile b/linux/base.Dockerfile index 984f711c..ca6df45d 100644 --- a/linux/base.Dockerfile +++ b/linux/base.Dockerfile @@ -209,7 +209,7 @@ RUN curl -fsSL https://aka.ms/install-azd.sh | bash && \ # # Install Office 365 CLI templates # - npm install -q -g @pnp/cli-microsoft365 && \ + npm install -q -g @pnp/cli-microsoft365 --loglevel verbose && \ # # Install Bicep CLI # From 0e59ea1aaca113b1bae473632ecb6093b4776223 Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Wed, 20 Aug 2025 13:26:36 -0700 Subject: [PATCH 02/14] update base dockerfile --- linux/base.Dockerfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/linux/base.Dockerfile b/linux/base.Dockerfile index ca6df45d..c5adaeeb 100644 --- a/linux/base.Dockerfile +++ b/linux/base.Dockerfile @@ -161,14 +161,22 @@ COPY ./linux/ansible/ansible* /usr/local/bin/ RUN chmod 755 /usr/local/bin/ansible* \ && cd /opt \ && virtualenv -p python3 ansible \ - && /bin/bash -c "source ansible/bin/activate && pip3 list --format=freeze | cut -d '=' -f1 | xargs -n1 pip3 install -U && pip3 install ansible && pip3 install pywinrm\>\=0\.2\.2 && deactivate" \ + && /bin/bash -c "source ansible/bin/activate && pip3 list --format=freeze | cut -d '=' -f1 | xargs -n1 pip3 install -U && deactivate" \ && rm -rf ~/.local/share/virtualenv/ \ && rm -rf ~/.cache/pip/ \ && ansible-galaxy collection install azure.azcollection --force -p /usr/share/ansible/collections \ # Temp: Proper fix is to use regular python for Ansible. && mkdir -p /usr/share/ansible/collections/ansible_collections/azure/azcollection/ \ - && wget -nv -q -O /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt https://raw.githubusercontent.com/ansible-collections/azure/dev/requirements.txt \ - && /opt/ansible/bin/python -m pip install -r /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt + && wget -nv -q -O /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt https://raw.githubusercontent.com/ansible-collections/azure/dev/requirements.txt + +# Install ansible and pywinrm packages using Azure Artifacts feed +RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ + cd /opt && \ + /bin/bash -c "source ansible/bin/activate && pip3 install --index-url $(cat /run/secrets/pip_index_url) ansible && pip3 install --index-url $(cat /run/secrets/pip_index_url) pywinrm\>\=0\.2\.2 && deactivate" + +# Install Azure collection requirements using Azure Artifacts feed +RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ + /opt/ansible/bin/python -m pip install --index-url $(cat /run/secrets/pip_index_url) -r /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt # Install latest version of Istio From 3fdb7d5c61f14d0cd9f2da42c34f57747cd4db68 Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Wed, 20 Aug 2025 15:28:20 -0700 Subject: [PATCH 03/14] update the base dockerfile --- linux/base.Dockerfile | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/linux/base.Dockerfile b/linux/base.Dockerfile index c5adaeeb..53489421 100644 --- a/linux/base.Dockerfile +++ b/linux/base.Dockerfile @@ -158,16 +158,18 @@ ENV LANG="en_US.utf8" # # BEGIN: Install Ansible in isolated Virtual Environment COPY ./linux/ansible/ansible* /usr/local/bin/ -RUN chmod 755 /usr/local/bin/ansible* \ - && cd /opt \ - && virtualenv -p python3 ansible \ - && /bin/bash -c "source ansible/bin/activate && pip3 list --format=freeze | cut -d '=' -f1 | xargs -n1 pip3 install -U && deactivate" \ - && rm -rf ~/.local/share/virtualenv/ \ - && rm -rf ~/.cache/pip/ \ - && ansible-galaxy collection install azure.azcollection --force -p /usr/share/ansible/collections \ - # Temp: Proper fix is to use regular python for Ansible. - && mkdir -p /usr/share/ansible/collections/ansible_collections/azure/azcollection/ \ - && wget -nv -q -O /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt https://raw.githubusercontent.com/ansible-collections/azure/dev/requirements.txt +RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ + chmod 755 /usr/local/bin/ansible* \ + && cd /opt \ + && virtualenv -p python3 ansible \ + && /bin/bash -c "source ansible/bin/activate && pip3 list --format=freeze | cut -d '=' -f1 | xargs -n1 pip3 install -U --index-url $(cat /run/secrets/pip_index_url) && pip3 install --index-url $(cat /run/secrets/pip_index_url) ansible && pip3 install --index-url $(cat /run/secrets/pip_index_url) pywinrm\>\=0\.2\.2 && deactivate" \ + && rm -rf ~/.local/share/virtualenv/ \ + && rm -rf ~/.cache/pip/ \ + && ansible-galaxy collection install azure.azcollection --force -p /usr/share/ansible/collections \ + # Temp: Proper fix is to use regular python for Ansible. + && mkdir -p /usr/share/ansible/collections/ansible_collections/azure/azcollection/ \ + && wget -nv -q -O /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt https://raw.githubusercontent.com/ansible-collections/azure/dev/requirements.txt \ + && /opt/ansible/bin/python -m pip install --index-url $(cat /run/secrets/pip_index_url) -r /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt # Install ansible and pywinrm packages using Azure Artifacts feed RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ From 2dfa15e7613410f43b426a30c418ed6608229d2c Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Wed, 20 Aug 2025 15:30:56 -0700 Subject: [PATCH 04/14] remove two run commands --- linux/base.Dockerfile | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/linux/base.Dockerfile b/linux/base.Dockerfile index 53489421..0c67a523 100644 --- a/linux/base.Dockerfile +++ b/linux/base.Dockerfile @@ -171,16 +171,6 @@ RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ && wget -nv -q -O /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt https://raw.githubusercontent.com/ansible-collections/azure/dev/requirements.txt \ && /opt/ansible/bin/python -m pip install --index-url $(cat /run/secrets/pip_index_url) -r /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt -# Install ansible and pywinrm packages using Azure Artifacts feed -RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ - cd /opt && \ - /bin/bash -c "source ansible/bin/activate && pip3 install --index-url $(cat /run/secrets/pip_index_url) ansible && pip3 install --index-url $(cat /run/secrets/pip_index_url) pywinrm\>\=0\.2\.2 && deactivate" - -# Install Azure collection requirements using Azure Artifacts feed -RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ - /opt/ansible/bin/python -m pip install --index-url $(cat /run/secrets/pip_index_url) -r /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt - - # Install latest version of Istio RUN export TMP_DIR=$(mktemp -d) \ && pushd "${TMP_DIR}" \ From 715e4b3a104d77ab75e0f0b4eee43cbc16ab3169 Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Wed, 20 Aug 2025 15:44:27 -0700 Subject: [PATCH 05/14] remove indentation --- linux/base.Dockerfile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/linux/base.Dockerfile b/linux/base.Dockerfile index 0c67a523..d79b41d2 100644 --- a/linux/base.Dockerfile +++ b/linux/base.Dockerfile @@ -159,17 +159,17 @@ ENV LANG="en_US.utf8" # # BEGIN: Install Ansible in isolated Virtual Environment COPY ./linux/ansible/ansible* /usr/local/bin/ RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ - chmod 755 /usr/local/bin/ansible* \ - && cd /opt \ - && virtualenv -p python3 ansible \ - && /bin/bash -c "source ansible/bin/activate && pip3 list --format=freeze | cut -d '=' -f1 | xargs -n1 pip3 install -U --index-url $(cat /run/secrets/pip_index_url) && pip3 install --index-url $(cat /run/secrets/pip_index_url) ansible && pip3 install --index-url $(cat /run/secrets/pip_index_url) pywinrm\>\=0\.2\.2 && deactivate" \ - && rm -rf ~/.local/share/virtualenv/ \ - && rm -rf ~/.cache/pip/ \ - && ansible-galaxy collection install azure.azcollection --force -p /usr/share/ansible/collections \ - # Temp: Proper fix is to use regular python for Ansible. - && mkdir -p /usr/share/ansible/collections/ansible_collections/azure/azcollection/ \ - && wget -nv -q -O /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt https://raw.githubusercontent.com/ansible-collections/azure/dev/requirements.txt \ - && /opt/ansible/bin/python -m pip install --index-url $(cat /run/secrets/pip_index_url) -r /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt + chmod 755 /usr/local/bin/ansible* \ + && cd /opt \ + && virtualenv -p python3 ansible \ + && /bin/bash -c "source ansible/bin/activate && pip3 list --format=freeze | cut -d '=' -f1 | xargs -n1 pip3 install -U --index-url $(cat /run/secrets/pip_index_url) && pip3 install --index-url $(cat /run/secrets/pip_index_url) ansible && pip3 install --index-url $(cat /run/secrets/pip_index_url) pywinrm\>\=0\.2\.2 && deactivate" \ + && rm -rf ~/.local/share/virtualenv/ \ + && rm -rf ~/.cache/pip/ \ + && ansible-galaxy collection install azure.azcollection --force -p /usr/share/ansible/collections \ + # Temp: Proper fix is to use regular python for Ansible. + && mkdir -p /usr/share/ansible/collections/ansible_collections/azure/azcollection/ \ + && wget -nv -q -O /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt https://raw.githubusercontent.com/ansible-collections/azure/dev/requirements.txt \ + && /opt/ansible/bin/python -m pip install --index-url $(cat /run/secrets/pip_index_url) -r /usr/share/ansible/collections/ansible_collections/azure/azcollection/requirements.txt # Install latest version of Istio RUN export TMP_DIR=$(mktemp -d) \ From 65493c8acde08424308040b950eb676364591698 Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Thu, 21 Aug 2025 14:38:39 -0700 Subject: [PATCH 06/14] add public pip_index_url --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2cd29236..37b5ded8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -37,7 +37,7 @@ jobs: # Build base dockerfile - name: Build the base.Dockerfile - run: docker build -t base_cloudshell -f linux/base.Dockerfile . + run: docker build --build-arg pip_index_url=https://pypi.org/simple -t base_cloudshell -f linux/base.Dockerfile . - name: Create temporary trivy directories run: | From f0b74fd31dec894c6ef625b3661b507711a67ae0 Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Thu, 21 Aug 2025 14:51:02 -0700 Subject: [PATCH 07/14] update ci --- .github/workflows/CI.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 37b5ded8..04cf6a18 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -37,7 +37,9 @@ jobs: # Build base dockerfile - name: Build the base.Dockerfile - run: docker build --build-arg pip_index_url=https://pypi.org/simple -t base_cloudshell -f linux/base.Dockerfile . + run: | + echo "https://pypi.org/simple/" > pip_index_url.txt + docker build -t base_cloudshell -f linux/base.Dockerfile --secret id=pip_index_url,src=pip_index_url.txt . - name: Create temporary trivy directories run: | From 05b81909649920e501279c5e82f8b8e7e21f79a1 Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Thu, 21 Aug 2025 15:31:45 -0700 Subject: [PATCH 08/14] update tools dockerfile --- .github/workflows/CI.yml | 2 +- linux/tools.Dockerfile | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 04cf6a18..76cc88d0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -59,7 +59,7 @@ jobs: # Build tools dockerfile - name: Build the tools.Dockerfile run: | - docker build -t tools_cloudshell --build-arg IMAGE_LOCATION=base_cloudshell -f linux/tools.Dockerfile . + docker build -t tools_cloudshell --build-arg IMAGE_LOCATION=base_cloudshell -f linux/tools.Dockerfile . --secret id=pip_index_url,src=pip_index_url.txt . - name: Scan Tools image with Trivy id: trivy-tools-scan diff --git a/linux/tools.Dockerfile b/linux/tools.Dockerfile index 4d12fb7e..c1d5f026 100644 --- a/linux/tools.Dockerfile +++ b/linux/tools.Dockerfile @@ -23,7 +23,9 @@ RUN tdnf clean all && \ rm -rf /var/cache/tdnf/* # Install any Azure CLI extensions that should be included by default. -RUN az extension add --system --name ssh -y \ +RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ + az config set extension.index_url=$(cat /run/secrets/pip_index_url) \ + && az extension add --system --name ssh -y \ && az extension add --system --name ml -y # Install kubectl From 82e71a973fcf84549048b64b453a92835d04502e Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Thu, 21 Aug 2025 15:42:41 -0700 Subject: [PATCH 09/14] corp acr image for testing --- linux/tools.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/tools.Dockerfile b/linux/tools.Dockerfile index c1d5f026..1229f776 100644 --- a/linux/tools.Dockerfile +++ b/linux/tools.Dockerfile @@ -4,7 +4,7 @@ # To build yourself locally, override this location with a local image tag. See README.md for more detail -ARG IMAGE_LOCATION=cdpxb787066ec88f4e20ae65e42a858c42ca00.azurecr.io/official/cloudshell:base.master.3df5312c.20250612.2 +ARG IMAGE_LOCATION=cloudconregtest.azurecr.io/cloudshell:base.master.548d49ff.20250719.3 # Copy from base build FROM ${IMAGE_LOCATION} From 6943e7a22f5b33f2edfe11e9bd324068c9b1b790 Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Thu, 21 Aug 2025 15:56:01 -0700 Subject: [PATCH 10/14] use --pip-extra-index-urls --- linux/tools.Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/linux/tools.Dockerfile b/linux/tools.Dockerfile index 1229f776..1a1b455e 100644 --- a/linux/tools.Dockerfile +++ b/linux/tools.Dockerfile @@ -24,9 +24,8 @@ RUN tdnf clean all && \ # Install any Azure CLI extensions that should be included by default. RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ - az config set extension.index_url=$(cat /run/secrets/pip_index_url) \ - && az extension add --system --name ssh -y \ - && az extension add --system --name ml -y + az extension add --system --name ssh -y --pip-extra-index-urls "$(cat /run/secrets/pip_index_url)" \ + && az extension add --system --name ml -y --pip-extra-index-urls "$(cat /run/secrets/pip_index_url)" # Install kubectl RUN az aks install-cli \ From 093a6a32b8234365525e50de81813cdf56e50049 Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Thu, 21 Aug 2025 17:12:12 -0700 Subject: [PATCH 11/14] add logs --- linux/tools.Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux/tools.Dockerfile b/linux/tools.Dockerfile index 1a1b455e..0c3ab0ce 100644 --- a/linux/tools.Dockerfile +++ b/linux/tools.Dockerfile @@ -24,8 +24,10 @@ RUN tdnf clean all && \ # Install any Azure CLI extensions that should be included by default. RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ - az extension add --system --name ssh -y --pip-extra-index-urls "$(cat /run/secrets/pip_index_url)" \ - && az extension add --system --name ml -y --pip-extra-index-urls "$(cat /run/secrets/pip_index_url)" + echo "Using Azure Artifacts feed: $(cat /run/secrets/pip_index_url)" && \ + export PIP_VERBOSE=1 && \ + az extension add --system --name ssh -y --pip-extra-index-urls "$(cat /run/secrets/pip_index_url)" --verbose --debug \ + && az extension add --system --name ml -y --pip-extra-index-urls "$(cat /run/secrets/pip_index_url)" --verbose --debug # Install kubectl RUN az aks install-cli \ From 78cbe237592da98c11f28df5eb9510d71b83dd7e Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Fri, 22 Aug 2025 16:25:39 -0700 Subject: [PATCH 12/14] update tools CI --- .github/workflows/CI.yml | 2 +- linux/base.Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 76cc88d0..dc811557 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -59,7 +59,7 @@ jobs: # Build tools dockerfile - name: Build the tools.Dockerfile run: | - docker build -t tools_cloudshell --build-arg IMAGE_LOCATION=base_cloudshell -f linux/tools.Dockerfile . --secret id=pip_index_url,src=pip_index_url.txt . + docker build -t tools_cloudshell --build-arg IMAGE_LOCATION=base_cloudshell -f linux/tools.Dockerfile --secret id=pip_index_url,src=pip_index_url.txt . - name: Scan Tools image with Trivy id: trivy-tools-scan diff --git a/linux/base.Dockerfile b/linux/base.Dockerfile index d79b41d2..79f3e35b 100644 --- a/linux/base.Dockerfile +++ b/linux/base.Dockerfile @@ -209,7 +209,7 @@ RUN curl -fsSL https://aka.ms/install-azd.sh | bash && \ # # Install Office 365 CLI templates # - npm install -q -g @pnp/cli-microsoft365 --loglevel verbose && \ + npm install -q -g @pnp/cli-microsoft365 && \ # # Install Bicep CLI # From b93313d73a8f907e3353f9092c7a7631e3bf6d76 Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Wed, 27 Aug 2025 13:32:34 -0700 Subject: [PATCH 13/14] cfs for ps and aks --- linux/tools.Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/linux/tools.Dockerfile b/linux/tools.Dockerfile index 0c3ab0ce..e8fe9c96 100644 --- a/linux/tools.Dockerfile +++ b/linux/tools.Dockerfile @@ -30,7 +30,9 @@ RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ && az extension add --system --name ml -y --pip-extra-index-urls "$(cat /run/secrets/pip_index_url)" --verbose --debug # Install kubectl -RUN az aks install-cli \ +RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ + export PIP_INDEX_URL=$(cat /run/secrets/pip_index_url) && \ + az aks install-cli \ && chmod +x /usr/local/bin/kubectl \ && chmod +x /usr/local/bin/kubelogin @@ -54,7 +56,13 @@ ENV POWERSHELL_DISTRIBUTION_CHANNEL=CloudShell \ # Copy and run script to install Powershell modules and setup Powershell machine profile COPY ./linux/powershell/ powershell -RUN cp ./powershell/libs/libmi.so /opt/microsoft/powershell/7/libmi.so && \ +RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ + cp ./powershell/libs/libmi.so /opt/microsoft/powershell/7/libmi.so && \ + # Configure PowerShell to use Azure Artifacts feed for PSResourceGet + export FEED_URL=$(cat /run/secrets/pip_index_url | sed 's|/simple/|/nuget/v3/index.json|') && \ + /usr/bin/pwsh -Command "Register-PSResourceRepository -Name 'PSGalleryUpstream' -Uri \"$env:FEED_URL\" -Trusted" && \ + # Temporarily override PowerShell Gallery URL in the setup script + sed -i "s|https://www.powershellgallery.com/api/v2|$FEED_URL|g" ./powershell/setupPowerShell.ps1 && \ /usr/bin/pwsh -File ./powershell/setupPowerShell.ps1 -image Base && \ cp -r ./powershell/PSCloudShellUtility /usr/local/share/powershell/Modules/PSCloudShellUtility/ && \ /usr/bin/pwsh -File ./powershell/setupPowerShell.ps1 -image Top && \ From 2b72ea04418f047a4f9db6cfe35497d99c4eddb6 Mon Sep 17 00:00:00 2001 From: Yoyo Wang Date: Wed, 27 Aug 2025 14:33:48 -0700 Subject: [PATCH 14/14] update psgallery --- linux/tools.Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/linux/tools.Dockerfile b/linux/tools.Dockerfile index e8fe9c96..0c7d50d0 100644 --- a/linux/tools.Dockerfile +++ b/linux/tools.Dockerfile @@ -58,11 +58,10 @@ ENV POWERSHELL_DISTRIBUTION_CHANNEL=CloudShell \ COPY ./linux/powershell/ powershell RUN --mount=type=secret,id=pip_index_url,target=/run/secrets/pip_index_url \ cp ./powershell/libs/libmi.so /opt/microsoft/powershell/7/libmi.so && \ - # Configure PowerShell to use Azure Artifacts feed for PSResourceGet - export FEED_URL=$(cat /run/secrets/pip_index_url | sed 's|/simple/|/nuget/v3/index.json|') && \ - /usr/bin/pwsh -Command "Register-PSResourceRepository -Name 'PSGalleryUpstream' -Uri \"$env:FEED_URL\" -Trusted" && \ - # Temporarily override PowerShell Gallery URL in the setup script - sed -i "s|https://www.powershellgallery.com/api/v2|$FEED_URL|g" ./powershell/setupPowerShell.ps1 && \ + # Set environment variables for PowerShell to potentially use Azure Artifacts feed + export NUGET_SOURCE=$(cat /run/secrets/pip_index_url | sed 's|/simple/|/nuget/v2|') && \ + # Temporarily override PowerShell Gallery URL in the setup script to use Azure Artifacts feed + sed -i "s|https://www.powershellgallery.com/api/v2|$NUGET_SOURCE|g" ./powershell/setupPowerShell.ps1 && \ /usr/bin/pwsh -File ./powershell/setupPowerShell.ps1 -image Base && \ cp -r ./powershell/PSCloudShellUtility /usr/local/share/powershell/Modules/PSCloudShellUtility/ && \ /usr/bin/pwsh -File ./powershell/setupPowerShell.ps1 -image Top && \