From dc98298b6692adfdfb2e65207af8af2e563a4674 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 1 Jul 2026 15:54:11 +0530 Subject: [PATCH] fix: Windows PowerShell 5.1 start_docker crash and paste-safe docs snippets Co-Authored-By: Claude Opus 4.8 (1M context) --- docs/deployment/docker.mdx | 7 ++----- docs/deployment/update.mdx | 5 +---- docs/getting-started/index.mdx | 4 +--- docs/getting-started/prerequisites.mdx | 6 ++---- scripts/start_docker.ps1 | 7 ++++++- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/docs/deployment/docker.mdx b/docs/deployment/docker.mdx index 3cc5973c..e7a1772f 100644 --- a/docs/deployment/docker.mdx +++ b/docs/deployment/docker.mdx @@ -48,9 +48,7 @@ Download the compose file and starter script, then confirm the prompt to start D curl -o docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml && curl -o start_docker.sh https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.sh && chmod +x start_docker.sh && ./start_docker.sh ``` ```powershell Windows -Invoke-WebRequest -OutFile docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml -Invoke-WebRequest -OutFile start_docker.ps1 https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.ps1 -.\start_docker.ps1 +Invoke-WebRequest -OutFile docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml; Invoke-WebRequest -OutFile start_docker.ps1 https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.ps1; .\start_docker.ps1 ``` @@ -89,8 +87,7 @@ For these cases, use the alternate local setup script which configures a coturn curl -o setup_local.sh https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/setup_local.sh && chmod +x setup_local.sh && ./setup_local.sh ``` ```powershell Windows -Invoke-WebRequest -OutFile setup_local.ps1 https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/setup_local.ps1 -.\setup_local.ps1 +Invoke-WebRequest -OutFile setup_local.ps1 https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/setup_local.ps1; .\setup_local.ps1 ``` diff --git a/docs/deployment/update.mdx b/docs/deployment/update.mdx index f598c610..d056b72d 100644 --- a/docs/deployment/update.mdx +++ b/docs/deployment/update.mdx @@ -76,10 +76,7 @@ docker compose down ./start_docker.sh ``` ```powershell Windows -Invoke-WebRequest -OutFile docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml -Invoke-WebRequest -OutFile start_docker.ps1 https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.ps1 -docker compose down -.\start_docker.ps1 +Invoke-WebRequest -OutFile docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml; Invoke-WebRequest -OutFile start_docker.ps1 https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.ps1; docker compose down; .\start_docker.ps1 ``` diff --git a/docs/getting-started/index.mdx b/docs/getting-started/index.mdx index cba5988c..e9c52295 100644 --- a/docs/getting-started/index.mdx +++ b/docs/getting-started/index.mdx @@ -33,9 +33,7 @@ Get the platform up and running using Docker with a small startup script on your curl -o docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml && curl -o start_docker.sh https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.sh && chmod +x start_docker.sh && ./start_docker.sh ``` ```powershell Windows -Invoke-WebRequest -OutFile docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml -Invoke-WebRequest -OutFile start_docker.ps1 https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.ps1 -.\start_docker.ps1 +Invoke-WebRequest -OutFile docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml; Invoke-WebRequest -OutFile start_docker.ps1 https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.ps1; .\start_docker.ps1 ``` diff --git a/docs/getting-started/prerequisites.mdx b/docs/getting-started/prerequisites.mdx index aebd6aad..50846336 100644 --- a/docs/getting-started/prerequisites.mdx +++ b/docs/getting-started/prerequisites.mdx @@ -86,11 +86,9 @@ REGISTRY=dograhai ./start_docker.sh ``` ```powershell Windows # Using GitHub Container Registry (recommended) -$env:REGISTRY = 'ghcr.io/dograh-hq' -.\start_docker.ps1 +$env:REGISTRY = 'ghcr.io/dograh-hq'; .\start_docker.ps1 # Using Docker Hub -$env:REGISTRY = 'dograhai' -.\start_docker.ps1 +$env:REGISTRY = 'dograhai'; .\start_docker.ps1 ``` diff --git a/scripts/start_docker.ps1 b/scripts/start_docker.ps1 index 86b9aa3d..5d30cc5c 100644 --- a/scripts/start_docker.ps1 +++ b/scripts/start_docker.ps1 @@ -7,7 +7,12 @@ $Utf8NoBom = [System.Text.UTF8Encoding]::new($false) function New-HexSecret { $bytes = [byte[]]::new(32) - [System.Security.Cryptography.RandomNumberGenerator]::Fill($bytes) + $rng = [System.Security.Cryptography.RandomNumberGenerator]::Create() + try { + $rng.GetBytes($bytes) + } finally { + $rng.Dispose() + } return -join ($bytes | ForEach-Object { $_.ToString('x2') }) }