①编写Dockerfile文件
mkdir -pv /home/atlassian/jira
vi Dockerfile
FROM cptactionhank/atlassian-jira-software:8.0.0
USER root
# 将代理破解包加入容器
COPY "atlassian-agent.jar" /opt/atlassian/jira/
# 设置启动加载代理包
RUN echo 'export CATALINA_OPTS="-javaagent:/opt/atlassian/jira/atlassian-agent.jar ${CATALINA_OPTS}"' >> /opt/atlassian/jira/bin/setenv.sh
②下载atlassian-agent.jar文件到 /home/atlassian/jira 下:
链接:https://pan.baidu.com/s/1bwN3Qmj5fzLRhQ3sifh4-w 密码:mtxl
③ 构建镜像
docker build -t jira/jira:8.4.0 .
④ 启动容器
mkdir -pv /home/atlassian/jira/jira
docker run --detach --publish 8765:8080 -v /home/atlassian/jira/jira:/var/atlassian/jira -v /etc/localtime:/etc/localtime jira/jira:8.4.0
或者映射data目录:
docker run --detach --publish 8765:8080 -v /home/atlassian/jira/data:/var/atlassian/jira/data -v /etc/localtime:/etc/localtime jira/jira:8.4.0
修改已创建的docker容器的--restart=always参数:
docker container update --restart=always 容器名
⑤ 访问网页http://127.0.0.1:8765
操作步骤和mysql5.7+配置参考:https://www.jianshu.com/p/3e4a08db8618
⑥:许可证配置
jira:
java -jar atlassian-agent.jar -d -m admin@ishendi.com -n J -pjira-o http://192.168.1.201 -s BJTB-P55C-QWL9-01DO
confuence:
java -jar atlassian-agent.jar -d -m admin@ishendi.com -n J -pconf-o http://192.168.1.201 -s B6HE-535L-8439-XHJM
synapse:
com.go2group.jira.plugin.synapse
java -jar atlassian-agent.jar -d -m admin@ishendi.com -n J -p 'com.go2group.jira.plugin.synapse' -o http://192.168.1.201 -s BJTB-P55C-QWL9-01DO
gantt:
java -jar atlassian-agent.jar -d -m admin@ishendi.com -n J -p'jp.ricksoft.plugins.wbsgantt-for-jira'-o http://192.168.1.201 -s BJTB-P55C-QWL9-01DO
5.7+版本数据库配置:
添加:
character_set_server=utf8mb4
default-storage-engine=INNODB
innodb_default_row_format=DYNAMIC
innodb_large_prefix=ON
innodb_file_format=Barracuda
innodb_log_file_size=2G
#sql_mode = NO_AUTO_VALUE_ON_ZERO 不需要此配置,请注释
数据库权限配置:
set global validate_password_policy=0;
set global validate_password_length=1;
CREATE DATABASE jira CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX on jira.* TO 'jira'@'%' IDENTIFIED BY 'jira';
GRANT ALL PRIVILEGES ON jira.* TO 'jira'@'%' IDENTIFIED BY 'jira';
flush privileges;
# 若不安装Confluence可忽略
CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON confluence.* TO 'confluence'@'%' IDENTIFIED BY 'confluence';
flush privileges;
附加:confluence 8.4.0 搭建后续更新,敬请期待或联系我。