From c49774d629c4b8643cc999cf38a0e9988d939f57 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Sat, 28 Mar 2026 14:28:31 +0100 Subject: [PATCH 1/3] Fix workshop script WSL path conversion and convert scripts to Unix line endings; update README with installation instructions --- README.md | 18 +++++++++++++++++- scripts/workshop.ps1 | 3 ++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 21b6c9b..b13ee02 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,27 @@ Basisrouten nach dem Start: 1. Docker + Compose (`docker compose` oder `docker-compose`) 2. Optional fuer TLS-Challenges: `easy-rsa`, `openssl`, `wireshark` +Docker muss in Linux installiert sein oder Docker Desktop mit WSL-Integration muss verfuegbar sein. + +### Installation + +#### Windows + +Installiere die erforderlichen Tools mit winget: + +```powershell +winget install --id Microsoft.VisualStudioCode -e +winget install --id Git.Git -e +winget install --id Docker.DockerDesktop -e +``` + +Nach der Installation von Docker Desktop aktiviere die WSL-Integration in den Einstellungen. + Plattformhinweise: - Linux: Docker Engine oder Docker Desktop - macOS: Docker Desktop (falls `make` fehlt -> `xcode-select --install`) -- Windows: Docker Desktop + WSL Integration aktiv +- Windows: Docker Desktop mit aktivierter WSL-Integration ## Schnellstart diff --git a/scripts/workshop.ps1 b/scripts/workshop.ps1 index 330df41..2387b7c 100644 --- a/scripts/workshop.ps1 +++ b/scripts/workshop.ps1 @@ -10,7 +10,8 @@ if (-not (Get-Command wsl.exe -ErrorAction SilentlyContinue)) { } $repoWinPath = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path -$repoWslPath = (& wsl.exe wslpath -a "$repoWinPath").Trim() +$drive = $repoWinPath[0].ToString().ToLower() +$repoWslPath = "/mnt/$drive/" + $repoWinPath.Substring(3) -replace '\\', '/' if (-not $repoWslPath) { Write-Error "Konnte den WSL Pfad fuer das Repo nicht ermitteln." From 0446f9859da4f4440dcafc47d8bf85bb90a7554f Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Sat, 28 Mar 2026 14:31:04 +0100 Subject: [PATCH 2/3] Restructure README to prioritize Windows; add installation commands for optional tools (apt, dnf, winget) --- README.md | 97 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index b13ee02..f217ca9 100644 --- a/README.md +++ b/README.md @@ -28,16 +28,9 @@ Basisrouten nach dem Start: - `http://localhost:8080/hints.html` -> Hint Cheatsheet - `http://localhost:8080/solutions.html` -> Musterloesungen -## Voraussetzungen (Linux / macOS / Windows WSL) +## Voraussetzungen -1. Docker + Compose (`docker compose` oder `docker-compose`) -2. Optional fuer TLS-Challenges: `easy-rsa`, `openssl`, `wireshark` - -Docker muss in Linux installiert sein oder Docker Desktop mit WSL-Integration muss verfuegbar sein. - -### Installation - -#### Windows +### Windows (empfohlen) Installiere die erforderlichen Tools mit winget: @@ -47,43 +40,75 @@ winget install --id Git.Git -e winget install --id Docker.DockerDesktop -e ``` +Optional fuer TLS-Challenges: + +```powershell +winget install --id OpenSSL.OpenSSL -e +winget install --id WiresharkFoundation.Wireshark -e +``` + Nach der Installation von Docker Desktop aktiviere die WSL-Integration in den Einstellungen. -Plattformhinweise: +### Linux / macOS -- Linux: Docker Engine oder Docker Desktop -- macOS: Docker Desktop (falls `make` fehlt -> `xcode-select --install`) -- Windows: Docker Desktop mit aktivierter WSL-Integration +Docker Engine oder Docker Desktop installieren (falls `make` fehlt auf macOS: `xcode-select --install`). + +Optional fuer TLS-Challenges: + +#### Ubuntu/Debian (apt) + +```bash +sudo apt update +sudo apt install easy-rsa openssl wireshark +``` + +#### Fedora/RHEL (dnf) + +```bash +sudo dnf install easy-rsa openssl wireshark +``` ## Schnellstart +### Windows + +```powershell +./scripts/workshop.ps1 -Action bootstrap +``` + +Falls PowerShell das Script blockiert: + +```powershell +Set-ExecutionPolicy -Scope Process Bypass +``` + +Alternativ im WSL-Terminal: + +```bash +./scripts/bootstrap.sh +``` + ### Linux / macOS ```bash ./scripts/bootstrap.sh ``` -### Windows (WSL) +Das Skript: -Option A (im WSL-Terminal): +- prueft Docker + Compose +- erstellt `.env` aus `.env.example` (falls nicht vorhanden) +- startet den Stack -```bash -./scripts/bootstrap.sh -``` +Hinweis zu Skriptnamen: -Option B (PowerShell Wrapper): +- `scripts/bootstrap.sh` ist der empfohlene Einstieg +- intern nutzt es `scripts/bootstrap-unix.sh` +- `scripts/bootstrap-wsl.sh` existiert nur noch als Kompatibilitaets-Wrapper -```powershell -./scripts/workshop.ps1 -Action bootstrap -``` +## Neu deployen / resetten -Der PowerShell-Wrapper braucht kein `make` und ruft Linux-Skripte direkt in WSL auf. - -Falls PowerShell das Script blockiert: - -```powershell -Set-ExecutionPolicy -Scope Process Bypass -``` +### Windows Weitere Aktionen in PowerShell: @@ -101,19 +126,7 @@ Wenn mehrere Distros installiert sind: ./scripts/workshop.ps1 -Action bootstrap -Distro Ubuntu-24.04 ``` -Das Skript: - -- prueft Docker + Compose -- erstellt `.env` aus `.env.example` (falls nicht vorhanden) -- startet den Stack - -Hinweis zu Skriptnamen: - -- `scripts/bootstrap.sh` ist der empfohlene Einstieg -- intern nutzt es `scripts/bootstrap-unix.sh` -- `scripts/bootstrap-wsl.sh` existiert nur noch als Kompatibilitaets-Wrapper - -## Neu deployen / resetten +### Linux / macOS ```bash make redeploy From c04e5d185cf76ddfc059f93582bb808dbe634b62 Mon Sep 17 00:00:00 2001 From: Herwig Koeck Date: Sun, 31 May 2026 21:36:00 +0200 Subject: [PATCH 3/3] git attributes added --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..57d3a20 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +*.sh text eol=lf +*.bash text eol=lf +*.ps1 text eol=crlf