Usage:
docker build . -t 'vso'
docker run -it vso:latest -SubscriptionName "'My Sub'" -PlanName "myplan" -ArmToken (az account get-access-token)| FROM mcr.microsoft.com/powershell:latest | |
| RUN apt-get update && apt-get install wget | |
| COPY LICENSE README.md / | |
| COPY install-vso.sh /install-vso.sh | |
| RUN sh /install-vso.sh | |
| COPY entrypoint.ps1 /entrypoint.ps1 | |
| ENTRYPOINT ["pwsh", "-Command", "/entrypoint.ps1"] |
| param($SubscriptionName, $PlanName, $ArmToken) | |
| Set-Location $HOME | |
| $env:VSCS_ARM_TOKEN = $ArmToken | |
| "y`nn`n" | codespaces start -s $SubscriptionName -p $PlanName | |
| Read-Host -Prompt "Press ENTER or ^C to stop server." |
| set -exv | |
| echo "Getting all VSO dependencies" | |
| reqsTemp=$(mktemp) | |
| wget -O $reqsTemp https://aka.ms/vsls-linux-prereq-script && chmod +x $reqsTemp && $reqsTemp | |
| AgentTemp=$(mktemp) | |
| AgentURL=https://vsoagentdownloads.blob.core.windows.net/vsoagent/VSOAgent_linux_3929085.tar.gz | |
| wget -O $AgentTemp --user-agent vso/1.0 $AgentURL | |
| mkdir -p /opt/vsonline/bin/ | |
| tar -xf $AgentTemp -C /opt/vsonline/bin/ | |
| rm $AgentTemp | |
| chmod +x /opt/vsonline/bin/codespaces | |
| chmod +x /opt/vsonline/bin/vsls-agent | |
| ln -sf /opt/vsonline/bin/codespaces /usr/bin/codespaces | |
| echo "VSO installed! Just run codespaces start to set up your machine's environment" |