Installazione di Guacamole con Docker: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
La documentazione docker è qui https://github.com/apache/guacamole-manual/blob/main/src/guacamole-docker.md | * La documentazione docker è qui https://github.com/apache/guacamole-manual/blob/main/src/guacamole-docker.md | ||
== Con repository GIT == | |||
* Leggere | |||
Readme.md | |||
* Customizzare | |||
.env | |||
* Lanciare | |||
./build.sh | |||
== Con DB MySQL / MariaDB == | == Con DB MySQL / MariaDB == | ||
Latest revision as of 11:31, 21 November 2025
- La documentazione docker è qui https://github.com/apache/guacamole-manual/blob/main/src/guacamole-docker.md
Con repository GIT
- Leggere
Readme.md
- Customizzare
.env
- Lanciare
./build.sh
Con DB MySQL / MariaDB
cat > docker-compose.yml <<'EOFile'
services:
guacamole-frontend:
image: guacamole/guacamole:latest
container_name: guacamole-frontend
depends_on:
- guacamole-guacd
- guacamole-db
environment:
- GUACD_HOSTNAME=guacamole-guacd
- MYSQL_HOSTNAME=guacamole-db
- MYSQL_DATABASE=guacamole_db
- MYSQL_USER=guacamole_user
- MYSQL_PASSWORD=guacamole_pass
- WEBAPP_CONTEXT=ROOT
- UID=1001
- GID=1001
# Put additional extension here directly in extensions/
# for example, for Branding the login screen:
# https://github.com/Zer0CoolX/guacamole-customize-loginscreen-extension
# Download, edit files on the jar/zip file and upload
- GUACAMOLE_HOME=/guacamole_home
# mkdir guacamole_home/; chown 1001:1001 guacamole_home/
# These extensions are builtin in the image, and activated by this var
#- EXTENSIONS="auth-ldap,auth-totp,history-recording-storage"
# To allow remote ip logging for session behind reverse proxy
- REMOTE_IP_VALVE_ENABLED=true
volumes:
- ./drive:/drive:rw
- ./guacamole_home:/guacamole_home
ports:
- 8080:8080/tcp
restart: unless-stopped
guacamole-guacd:
image: guacamole/guacd:latest
container_name: guacamole-guacd
restart: unless-stopped
volumes:
- ./drive:/drive:rw
- ./record:/record:rw
guacamole-db:
image: mariadb:11.2-jammy
container_name: guacamole-db
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=guacamole_db
- MYSQL_USER=guacamole_user
- MYSQL_PASSWORD=guacamole_pass
restart: unless-stopped
volumes:
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:ro
- ./mysql:/var/lib/mysql
#- ./mysql-init.sql:/tmp/mysql-init.sql
EOFile
Con DB Postgresql
- Creare docker-compose.yml
cat > docker-compose.yml <<EOFile
version: '3.9'
# services
services:
# guacd
guacd:
container_name: guacamole_backend
image: guacamole/guacd:latest
restart: always
volumes:
- ./drive:/drive:rw
- ./record:/record:rw
# postgres
postgres:
container_name: guacamole_database
environment:
PGDATA: /var/lib/postgresql/data/guacamole
POSTGRES_DB: guacamole_db
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD}'
POSTGRES_USER: '${POSTGRES_USER}'
image: postgres:13.4
restart: always
volumes:
- ./init:/docker-entrypoint-initdb.d:ro
- ./data:/var/lib/postgresql/data:rw
# guacamole
guacamole:
container_name: guacamole_frontend
depends_on:
- guacd
- postgres
environment:
GUACD_HOSTNAME: guacd
POSTGRES_DATABASE: guacamole_db
POSTGRES_HOSTNAME: postgres
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD}'
POSTGRES_USER: '${POSTGRES_USER}'
POSTGRESQL_AUTO_CREATE_ACCOUNTS: true
WEBAPP_CONTEXT=ROOT # to access as /
WEBAPP_CONTEXT=remote # to access as /remote
image: guacamole/guacamole:latest
ports:
- 8888:8080/tcp
links:
- guacd
restart: always
volumes:
- ./drive:/drive:rw
EOFile
- Creare il file contente a password di postgres:
cat > .env <<EOFile POSTGRES_PASSWORD='PleasePutAStrongPasswordHere' POSTGRES_USER='guacamole_user' EOFile
- Creare il file di inizializzazione del DB
mkdir init docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --postgres > init/initdb.sql
- Lanciare
docker compose up
- Loggarsi su http://myhostname:8888/guacamole con
guacadmin guacadmin
- Per cambiare la password, andare su Opzioni/Preferenze