Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 1.8 KB

README.md

File metadata and controls

47 lines (29 loc) · 1.8 KB

Guacamole

092. Security Tools ➡️ Guacamole

Guacamole Banner

In this Tutorial we are going to prepare a Docker compose files for running Guacamole in a Browser.

Video

In this Tutorial we are going to install Guacamole as a Docker container in our Homelab.

Video

Links

Prerequisites

Preparations

These steps are explained in this video:

1️⃣ Forward ports on your Router
2️⃣ Add A-Records
3️⃣ Add NPM Proxy Hosts
4️⃣ Clone latest Sources

Guacamole Installation

You can execute the recreate.sh script:

$TF_VAR_PATH_APP/docker/$TF_VAR_GEACAMOLE_NAME/recreate.sh

#!/bin/bash
# Initialize database
$TF_VAR_PATH_APP/docker/$TF_VAR_GUACAMOLE_NAME/init_db.sh
# Clean Previous
$TF_VAR_COT compose -f $TF_VAR_PATH_APP/docker/$TF_VAR_GUACAMOLE_NAME/docker-compose.yaml down
rm -rf $HOME/docker/$TF_VAR_GUACAMOLE_NAME
# Compose Up
$TF_VAR_COT compose -f $TF_VAR_PATH_APP/docker/$TF_VAR_GUACAMOLE_NAME/docker-compose.yaml up -d --wait --build
# ⬇️

  • # user/password: guacadmin/guacadmin
    version: "3.8"
    services:
    guacamole-mysql: # ${TF_VAR_GUACAMOLE_NAME}-${TF_VAR_MYSQL_NAME}
    extends:
    service: ${TF_VAR_MYSQL_NAME}
    file: ${TF_VAR_PATH_APP}/docker/${TF_VAR_MYSQL_NAME}/docker-compose.yaml
    container_name: ${TF_VAR_GUACAMOLE_NAME}-${TF_VAR_MYSQL_NAME}
    volumes:
    - ${TF_VAR_PATH_APP}/docker/${TF_VAR_GUACAMOLE_NAME}/config/${TF_VAR_MYSQL_NAME}/init.sql:/docker-entrypoint-initdb.d/init.sql
    - $HOME/docker/${TF_VAR_GUACAMOLE_NAME}/${TF_VAR_MYSQL_NAME}/mysql:/var/lib/mysql
    environment:
    MYSQL_DATABASE: ${TF_VAR_GUACAMOLE_NAME}
    networks:
    - ${TF_VAR_GUACAMOLE_NAME}
    guacd: # ${TF_VAR_GUACD_NAME}
    image: ${TF_VAR_DOMAIN}/${TF_VAR_GUACD_NAME}:${TF_VAR_VERSION_DOCKER_GUACD}
    build:
    context: .
    dockerfile: ${TF_VAR_PATH_APP}/docker/${TF_VAR_GUACAMOLE_NAME}/dockerfile_${TF_VAR_GUACD_NAME}
    args:
    VERSION: ${TF_VAR_VERSION_DOCKER_GUACD}
    container_name: ${TF_VAR_GUACD_NAME}
    restart: unless-stopped
    volumes:
    - $HOME/docker/${TF_VAR_GUACAMOLE_NAME}/${TF_VAR_GUACD_NAME}/config:/config
    - $HOME/docker/${TF_VAR_GUACAMOLE_NAME}/${TF_VAR_GUACD_NAME}/drive:/drive:rw
    - $HOME/docker/${TF_VAR_GUACAMOLE_NAME}/${TF_VAR_GUACD_NAME}/record:/record:rw
    # ports:
    # - ${TF_VAR_GUACD_PORT_EXT}:${TF_VAR_GUACD_PORT_INT}
    networks:
    - ${TF_VAR_GUACAMOLE_NAME}
    guacamole: # ${TF_VAR_GUACAMOLE_NAME}
    depends_on:
    guacd: # ${TF_VAR_GUACD_NAME}
    condition: service_started
    guacamole-mysql: # ${TF_VAR_GUACAMOLE_NAME}-${TF_VAR_MYSQL_NAME}
    condition: service_healthy
    image: ${TF_VAR_DOMAIN}/${TF_VAR_GUACAMOLE_NAME}:${TF_VAR_VERSION_DOCKER_GUACAMOLE}
    build:
    context: .
    dockerfile: ${TF_VAR_PATH_APP}/docker/${TF_VAR_GUACAMOLE_NAME}/dockerfile_${TF_VAR_GUACAMOLE_NAME}
    args:
    VERSION: ${TF_VAR_VERSION_DOCKER_GUACAMOLE}
    container_name: ${TF_VAR_GUACAMOLE_NAME}
    restart: unless-stopped
    volumes:
    - $HOME/docker/${TF_VAR_GUACAMOLE_NAME}/initdb:/data
    ports:
    - ${TF_VAR_GUACAMOLE_PORT_EXT}:${TF_VAR_GUACAMOLE_PORT_INT}
    environment:
    GUACD_HOSTNAME: ${TF_VAR_GUACD_NAME}
    GUACD_PORT: ${TF_VAR_GUACD_PORT_INT}
    MYSQL_HOSTNAME: ${TF_VAR_GUACAMOLE_NAME}-${TF_VAR_MYSQL_NAME}
    MYSQL_DATABASE: ${TF_VAR_GUACAMOLE_NAME}
    MYSQL_USER: ${TF_VAR_MYSQL_USER}
    MYSQL_PASSWORD: ${TF_VAR_MYSQL_PASSWORD}
    links:
    - ${TF_VAR_GUACD_NAME}
    - ${TF_VAR_GUACAMOLE_NAME}-${TF_VAR_MYSQL_NAME}
    networks:
    - ${TF_VAR_GUACAMOLE_NAME}
    networks:
    guacamole: # ${TF_VAR_GUACAMOLE_NAME}
    name: ${TF_VAR_GUACAMOLE_NAME}
    driver: bridge