1.创建dockerfile文件
FROM cptactionhank/atlassian-jira-software:latest
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
2.下载破解文件,解压其中的atlassian-agent.jar文件到当前的dockerfile文件同一个目录下
https://files.cnblogs.com/files/sanduzxcvbnm/atlassian-agent-v1.2.3.zip
3.构建docker镜像
docker build -t jira:latest .
4.启动容器
#提前创建/www/wwwroot/jira目录,8002端口可修改
docker run -d --name jira\
--restart always \
-p 8002:8080 \
-e TZ="Asia/Shanghai" \
-m 4096M \
-v /www/wwwroot/jira:/var/atlassian/jira \
jira:latest
5.访问ip:8002安装jira并获取到服务器id
(如需使用外部数据库,可用MySQL命令:
CREATE DATABASE jiradb CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
grant all on jiradb.* to 'jirauser'@'%' identified by 'jirakey';
)
6.进入docker容器内atlassian-agent.jar所在的文件夹
docker exec -it jira bash
cd /opt/atlassian/jira/
(退出docker:exit)
7.根据服务器id生成许可证,需替换邮箱([email protected])、名称(BAT)、访问地址(http://192.168.0.89)、服务器ID(BY9B-GWD1-1C78-K2DE)
java -jar atlassian-agent.jar \
-d -m [email protected] -n BAT \
-p jira -o http://192.168.0.89 \
-s BY9B-GWD1-1C78-K2DE
8.将生成的许可证复制到jira安装页面,完成jira的破解安装
参考:https://www.cnblogs.com/sanduzxcvbnm/p/13808648.html
https://www.cnblogs.com/zepc007/p/12394256.html