guacamole docker一键部署脚本

2023-12-05 14:12

本文主要是介绍guacamole docker一键部署脚本,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

前言

在我学习guacamole的过程中发现全网大致有两种方式安装guacamole的方式:

1. 直接安装(下载java环境/mysql/, 修改配置)

2. docker安装(和直接安装类似,需要下载相关环境,然后做配置)

然后最近项目需要为了偷懒,于是学习了docker-compose,编写了docker-compose-guacamole脚本,最后测试成功跑通。

具体步骤

新建文件:docker-compose-guacamole.yml

将如下内容粘贴保存

version: '3'services:guacamole:image: guacamole/guacamoledepends_on:- guacd- guacamole-mysql-serverenvironment:MYSQL_HOSTNAME: guacamole-mysql-serverMYSQL_DATABASE: guacamole_dbMYSQL_USER: guacamoleMYSQL_PASSWORD: winring2023GUACD_HOSTNAME: guacdports:- "9000:8080"networks:- my-guacamole-networksguacd:image: guacamole/guacddepends_on:- guacamole-mysql-servernetworks:- my-guacamole-networksguacamole-mysql-server:image: mysql/mysql-servervolumes:- ./initdb.sql:/docker-entrypoint-initdb.d/initdb.sqlrestart: alwaysenvironment:MYSQL_ROOT_PASSWORD: winring2023MYSQL_DATABASE: guacamole_dbMYSQL_USER: guacamoleMYSQL_PASSWORD: winring2023networks:- my-guacamole-networksnetworks:my-guacamole-networks:driver: bridge

新建initdb.sql数据库

将如下内容粘贴保存

--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements.  See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership.  The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you may not use this file except in compliance
-- with the License.  You may obtain a copy of the License at
--
--   http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing,
-- software distributed under the License is distributed on an
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-- KIND, either express or implied.  See the License for the
-- specific language governing permissions and limitations
-- under the License.
----
-- Table of connection groups. Each connection group has a name.
--CREATE TABLE `guacamole_connection_group` (`connection_group_id`   int(11)      NOT NULL AUTO_INCREMENT,`parent_id`             int(11),`connection_group_name` varchar(128) NOT NULL,`type`                  enum('ORGANIZATIONAL','BALANCING') NOT NULL DEFAULT 'ORGANIZATIONAL',-- Concurrency limits`max_connections`          int(11),`max_connections_per_user` int(11),`enable_session_affinity`  boolean NOT NULL DEFAULT 0,PRIMARY KEY (`connection_group_id`),UNIQUE KEY `connection_group_name_parent` (`connection_group_name`, `parent_id`),CONSTRAINT `guacamole_connection_group_ibfk_1`FOREIGN KEY (`parent_id`)REFERENCES `guacamole_connection_group` (`connection_group_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of connections. Each connection has a name, protocol, and
-- associated set of parameters.
-- A connection may belong to a connection group.
--CREATE TABLE `guacamole_connection` (`connection_id`       int(11)      NOT NULL AUTO_INCREMENT,`connection_name`     varchar(128) NOT NULL,`parent_id`           int(11),`protocol`            varchar(32)  NOT NULL,-- Guacamole proxy (guacd) overrides`proxy_port`              integer,`proxy_hostname`          varchar(512),`proxy_encryption_method` enum('NONE', 'SSL'),-- Concurrency limits`max_connections`          int(11),`max_connections_per_user` int(11),-- Load-balancing behavior`connection_weight`        int(11),`failover_only`            boolean NOT NULL DEFAULT 0,PRIMARY KEY (`connection_id`),UNIQUE KEY `connection_name_parent` (`connection_name`, `parent_id`),CONSTRAINT `guacamole_connection_ibfk_1`FOREIGN KEY (`parent_id`)REFERENCES `guacamole_connection_group` (`connection_group_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of base entities which may each be either a user or user group. Other
-- tables which represent qualities shared by both users and groups will point
-- to guacamole_entity, while tables which represent qualities specific to
-- users or groups will point to guacamole_user or guacamole_user_group.
--CREATE TABLE `guacamole_entity` (`entity_id`     int(11)            NOT NULL AUTO_INCREMENT,`name`          varchar(128)       NOT NULL,`type`          enum('USER','USER_GROUP') NOT NULL,PRIMARY KEY (`entity_id`),UNIQUE KEY `guacamole_entity_name_scope` (`type`, `name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;--
-- Table of users. Each user has a unique username and a hashed password
-- with corresponding salt. Although the authentication system will always set
-- salted passwords, other systems may set unsalted passwords by simply not
-- providing the salt.
--CREATE TABLE 	

这篇关于guacamole docker一键部署脚本的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/457895

相关文章

如何在Ubuntu 24.04上部署Zabbix 7.0对服务器进行监控

《如何在Ubuntu24.04上部署Zabbix7.0对服务器进行监控》在Ubuntu24.04上部署Zabbix7.0监控阿里云ECS服务器,需配置MariaDB数据库、开放10050/1005... 目录软硬件信息部署步骤步骤 1:安装并配置mariadb步骤 2:安装Zabbix 7.0 Server

使用Docker构建Python Flask程序的详细教程

《使用Docker构建PythonFlask程序的详细教程》在当今的软件开发领域,容器化技术正变得越来越流行,而Docker无疑是其中的佼佼者,本文我们就来聊聊如何使用Docker构建一个简单的Py... 目录引言一、准备工作二、创建 Flask 应用程序三、创建 dockerfile四、构建 Docker

SpringBoot+Docker+Graylog 如何让错误自动报警

《SpringBoot+Docker+Graylog如何让错误自动报警》SpringBoot默认使用SLF4J与Logback,支持多日志级别和配置方式,可输出到控制台、文件及远程服务器,集成ELK... 目录01 Spring Boot 默认日志框架解析02 Spring Boot 日志级别详解03 Sp

java实现docker镜像上传到harbor仓库的方式

《java实现docker镜像上传到harbor仓库的方式》:本文主要介绍java实现docker镜像上传到harbor仓库的方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地... 目录1. 前 言2. 编写工具类2.1 引入依赖包2.2 使用当前服务器的docker环境推送镜像2.2

利用Python脚本实现批量将图片转换为WebP格式

《利用Python脚本实现批量将图片转换为WebP格式》Python语言的简洁语法和库支持使其成为图像处理的理想选择,本文将介绍如何利用Python实现批量将图片转换为WebP格式的脚本,WebP作为... 目录简介1. python在图像处理中的应用2. WebP格式的原理和优势2.1 WebP格式与传统

Linux脚本(shell)的使用方式

《Linux脚本(shell)的使用方式》:本文主要介绍Linux脚本(shell)的使用方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录概述语法详解数学运算表达式Shell变量变量分类环境变量Shell内部变量自定义变量:定义、赋值自定义变量:引用、修改、删

Python实现一键PDF转Word(附完整代码及详细步骤)

《Python实现一键PDF转Word(附完整代码及详细步骤)》pdf2docx是一个基于Python的第三方库,专门用于将PDF文件转换为可编辑的Word文档,下面我们就来看看如何通过pdf2doc... 目录引言:为什么需要PDF转Word一、pdf2docx介绍1. pdf2docx 是什么2. by

Golang实现Redis分布式锁(Lua脚本+可重入+自动续期)

《Golang实现Redis分布式锁(Lua脚本+可重入+自动续期)》本文主要介绍了Golang分布式锁实现,采用Redis+Lua脚本确保原子性,持可重入和自动续期,用于防止超卖及重复下单,具有一定... 目录1 概念应用场景分布式锁必备特性2 思路分析宕机与过期防止误删keyLua保证原子性可重入锁自动

Web技术与Nginx网站环境部署教程

《Web技术与Nginx网站环境部署教程》:本文主要介绍Web技术与Nginx网站环境部署教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、Web基础1.域名系统DNS2.Hosts文件3.DNS4.域名注册二.网页与html1.网页概述2.HTML概述3.

Nginx使用Keepalived部署web集群(高可用高性能负载均衡)实战案例

《Nginx使用Keepalived部署web集群(高可用高性能负载均衡)实战案例》本文介绍Nginx+Keepalived实现Web集群高可用负载均衡的部署与测试,涵盖架构设计、环境配置、健康检查、... 目录前言一、架构设计二、环境准备三、案例部署配置 前端 Keepalived配置 前端 Nginx