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

相关文章

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

ubuntu如何部署Dify以及安装Docker? Dify安装部署指南

《ubuntu如何部署Dify以及安装Docker?Dify安装部署指南》Dify是一个开源的大模型应用开发平台,允许用户快速构建和部署基于大语言模型的应用,ubuntu如何部署Dify呢?详细请... Dify是个不错的开源LLM应用开发平台,提供从 Agent 构建到 AI workflow 编排、RA

ubuntu16.04如何部署dify? 在Linux上安装部署Dify的技巧

《ubuntu16.04如何部署dify?在Linux上安装部署Dify的技巧》随着云计算和容器技术的快速发展,Docker已经成为现代软件开发和部署的重要工具之一,Dify作为一款优秀的云原生应用... Dify 是一个基于 docker 的工作流管理工具,旨在简化机器学习和数据科学领域的多步骤工作流。它

Nginx部署React项目时重定向循环问题的解决方案

《Nginx部署React项目时重定向循环问题的解决方案》Nginx在处理React项目请求时出现重定向循环,通常是由于`try_files`配置错误或`root`路径配置不当导致的,本文给大家详细介... 目录问题原因1. try_files 配置错误2. root 路径错误解决方法1. 检查 try_f

Docker安装MySQL镜像的详细步骤(适合新手小白)

《Docker安装MySQL镜像的详细步骤(适合新手小白)》本文详细介绍了如何在Ubuntu环境下使用Docker安装MySQL5.7版本,包括从官网拉取镜像、配置MySQL容器、设置权限及内网部署,... 目录前言安装1.访问docker镜像仓库官网2.找到对应的版本,复制右侧的命令即可3.查看镜像4.启

debian12安装docker的实现步骤

《debian12安装docker的实现步骤》本文主要介绍了debian12安装docker的实现步骤,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着... 目录步骤 1:更新你的系统步骤 2:安装依赖项步骤 3:添加 docker 的官方 GPG 密钥步骤

PyQt5+Python-docx实现一键生成测试报告

《PyQt5+Python-docx实现一键生成测试报告》作为一名测试工程师,你是否经历过手动填写测试报告的痛苦,本文将用Python的PyQt5和python-docx库,打造一款测试报告一键生成工... 目录引言工具功能亮点工具设计思路1. 界面设计:PyQt5实现数据输入2. 文档生成:python-