https://github.com/boschkundendienst/guacamole-docker-compose/blob/master/docker-compose.yml
https://github.com/reisbel/guacamole-docker-compose
http://localhost:8428/guacamole/
guacadmin/guacadmin uname/pwd
WD=/opt/guacamole mkdir -p $WD/{data,data/db,data/dbinit,setup} cd $WD/setup cat << 'EOF' >docker-compose.yaml version: "3" services: init-guacamole-db: image: guacamole/guacamole:latest command: ["/bin/sh", "-c", "test -e /init/initdb.sql && echo 'init file already exists' || /opt/guacamole/bin/initdb.sh --postgres > /init/initdb.sql" ] volumes: - type: bind source: /opt/guacamole/data/dbinit target: /init postgres: container_name: postgres_guac image: postgres:latest hostname: postgres_guac volumes: - type: bind source: /opt/guacamole/data/dbinit target: /docker-entrypoint-initdb.d - type: bind source: /opt/guacamole/data/db target: /var/lib/postgresql/data environment: POSTGRES_USER: ${POSTGRES_USER:-guacdb} POSTGRES_PASSWORD: depends_on: - init-guacamole-db guacd: container_name: guacd image: guacamole/guacd:latest hostname: guacd guac: container_name: guac image: guacamole/guacamole:latest hostname: guac ports: - "8428:8080" environment: GUACD_HOSTNAME: guacd POSTGRES_HOSTNAME: postgres POSTGRES_DATABASE: ${POSTGRES_USER:-guacdb} POSTGRES_USER: ${POSTGRES_USER:-guacdb} POSTGRES_PASSWORD: depends_on: - postgres - guacd volumes: dbinit: driver: local dbdata: driver: local EOF chmod +x docker-compose.yaml
cd $WD/setup cat << 'EOF'>.env POSTGRES_USER=guacamoledbuser POSTGRES_PASSWORD=guacamoledbuserpwd EOF chmod +x .env
WD=/opt/guacamole/setup cat << EOF >$WD/guacamole.service.setup.sh cat << EOL >/lib/systemd/system/guacamole.service [Unit] Description=guacamole_Docker Requires=docker.service network-online.target [Service] WorkingDirectory=$WD ExecStartPre=docker-compose pull Restart=on-abnormal ExecStart=/usr/bin/docker-compose --project-name guacamole --project-directory $WD -f $WD/docker-compose.yaml up --force-recreate ExecStop=/usr/bin/docker-compose --project-name guacamole --project-directory $WD -f $WD/docker-compose.yaml stop [Install] WantedBy=multi-user.target EOL systemctl enable guacamole systemctl restart guacamole systemctl status guacamole EOF chmod +x $WD/guacamole.service.setup.sh $WD/guacamole.service.setup.sh