docker部署confluence与破解

mysql安装

略..

innodb_log_file_size=2GB
max_allowed_packet=256M

创建mysql用户

1
2
3
4
5
6
7
8
9
#CREATE DATABASE <database-name> CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
create database confluence character set utf8mb4 collate utf8mb4_bin;
#CREATE user '<confluenceuser>'@'localhost' IDENTIFIED BY '<password>';
create user confluence_user@localhost identified by '3e4r5t6y';
create user confluence_user@192.168.248.128 identified by '3e4r5t6y';
#GRANT ALL PRIVILEGES ON <database-name>.* TO '<confluenceuser>'@'localhost' WITH GRANT OPTION;
grant all privileges on confluence.* to confluence_user@localhost with grant option;
grant all privileges on confluence.* to confluence_user@192.168.248.128 with grant option;
grant all privileges on confluence.* to confluence_user@172.21.0.2 with grant option;

启动

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
version: '3'
services:
confluence:
image: "atlassian/confluence-server"
volumes:
- ./atlassian-agent.jar:/var/atlassian/atlassian-agent.jar
- ./mysql-connector-java-8.0.22.jar:/opt/atlassian/confluence/confluence/WEB-INF/lib/mysql-connector-java-8.0.22.jar
- /your-confluence-home:/var/atlassian/application-data/confluence
environment:
- JAVA_OPTS="-javaagent:/var/atlassian/atlassian-agent.jar"
- JVM_MINIMUM_MEMORY=2048m
- JVM_MAXIMUM_MEMORY=2048m
- JVM_RESERVED_CODE_CACHE_SIZE=512m
ports:
- "8090:8090"
restart: always

首次登陆获取Server ID

破解,进入docker容器内部atlassian-agent.jar文件所在目录下执行如下命令

1
docker exec -it confluence_confluence_1  java -jar /var/atlassian/atlassian-agent.jar -d -m test@test.com -n BAT -p 'conf' -o http://localhost:8090 -s BJED-OHiT-J0AL-ZLM9