Prepare fix for Docker Desktop in Windows

This commit is contained in:
Marco Ochse
2024-05-05 18:57:59 +02:00
committed by GitHub
parent 0451cd9acd
commit 99539562f2
4 changed files with 82 additions and 56 deletions

12
genuserwin.ps1 Normal file
View File

@ -0,0 +1,12 @@
# Run genuser.sh within tpotinit, prepare path and file
# Define the volume paths
$homePath = $Env:USERPROFILE + "\tpotce"
$nginxpasswdPath = $homePath + "\data\nginx\conf\nginxpasswd"
# Ensure nginxpasswd file exists
if (-Not (Test-Path $nginxpasswdPath)) {
New-Item -ItemType File -Force -Path $nginxpasswdPath
}
# Run the Docker container without specifying UID / GID
docker run -v "${homePath}:/data" --entrypoint bash -it dtagdevsec/tpotinit:24.04 "/opt/tpot/bin/genuser.sh"