Created
May 4, 2025 19:18
-
-
Save alastorid/a9b131f3f3ce355c2eb0104a9cc01426 to your computer and use it in GitHub Desktop.
Get guacamole running now
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Host "pull guacamole and mysql" -ForegroundColor Cyan | |
docker pull guacamole/guacamole | |
docker pull guacamole/guacd | |
docker pull mysql/mysql-server | |
Write-Host "mysql user=root pass=1234" -ForegroundColor Cyan | |
docker run --name mysql -e MYSQL_ROOT_PASSWORD=1234 -d mysql/mysql-server | |
Write-Host "generate guacamole initdb.sql" -ForegroundColor Magenta | |
docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --mysql | Out-File -Encoding ASCII initdb.sql | |
Read-Host -Prompt "Press Enter if you feel your MySQL is ready" | |
docker exec -i mysql mysql -u root -p1234 -e "CREATE DATABASE db;" | |
docker exec -i mysql mysql -u root -p1234 -e "CREATE USER 'root'@'%' IDENTIFIED BY '1234';" | |
docker exec -i mysql mysql -u root -p1234 -e "GRANT SELECT,INSERT,UPDATE,DELETE ON db.* TO 'root'@'%';" | |
docker exec -i mysql mysql -u root -p1234 -e "FLUSH PRIVILEGES;" | |
docker cp initdb.sql mysql:/initdb.sql | |
docker exec -i mysql mysql -u root -p1234 db -e "source /initdb.sql" | |
Write-Host "Run Guacamole" -ForegroundColor Green | |
docker run --name guacd -d guacamole/guacd | |
docker run --name guacamole --link guacd:guacd --link mysql:mysql ` | |
-e MYSQL_DATABASE=db ` | |
-e MYSQL_USER=root ` | |
-e MYSQL_PASSWORD=1234 ` | |
-d -p 127.0.0.1:8080:8080 guacamole/guacamole | |
Write-Host "Go http://localhost:8080" -ForegroundColor Green | |
Write-Host "Default login: guacadmin/guacadmin" -ForegroundColor Yellow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment