2021-07-16 21:40:31 +03:00
|
|
|
$DEV_ENV_IMAGE = "mcr.microsoft.com/oss/azcu/go-dev:v1.32.3"
|
2019-11-04 21:42:45 +03:00
|
|
|
$DEV_ENV_WORK_DIR = "/aks-engine"
|
|
|
|
|
|
|
|
# Ensure docker is configured for linux containers
|
|
|
|
$json = (docker version --format "{{json .}}" | ConvertFrom-Json)
|
|
|
|
if ($json.Server.Os -ne "linux")
|
|
|
|
{
|
|
|
|
Write-Error "Please switch Docker use to Linux containers on Windows"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
docker.exe run -it --rm -w $DEV_ENV_WORK_DIR -v `"$($GOPATH)/pkg/mod`":/go/pkg/mod -v `"$($PWD)`":$DEV_ENV_WORK_DIR $DEV_ENV_IMAGE bash
|