参考官方文档
https://docs.jumpserver.org/zh/master/install/docker_install/
https://docs.jumpserver.org/zh/1.4.8/faq_rdp.html
一.环境部署
1.搭建docker环境
yum -y install docker
2.安装docker-compose
centos
sudo yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum install docker-ce
启动docker服务sudo systemctl start docker
编辑sudo vi /etc/docker/daemon.json
{
"registry-mirrors": ["https://dockerhub.azk8s.cn"],
"data-root": "/data/docker",
"metrics-addr" : "0.0.0.0:9323",
"experimental" : true ,
"bip": "172.31.0.1/24",
"default-address-pools":[
{"base":"172.31.0.0/16","size":24}
]
}
sudo systemctl enable docker
sudo systemctl restart docker
#docker-compose下载
sudo curl -L https://github.com/docker/compose/releases/download/1.24.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
3.创建项目目录
mkdir -p /home/xxx/jms
cd jms
4.下载jms的docker项目
git clone https://github.com/wojiushixiaobai/docker-compose.git
version: '3'
services:
mysql:
image: jumpserver/jms_mysql:${Version}
container_name: jms_mysql
restart: always
tty: true
environment:
DB_PORT: $DB_PORT
DB_USER: $DB_USER
DB_PASSWORD: $DB_PASSWORD
DB_NAME: $DB_NAME
volumes:
- mysql-data:/var/lib/mysql
networks:
- jumpserver
redis:
image: jumpserver/jms_redis:${Version}
container_name: jms_redis
restart: always
tty: true
environment: