# centos7系统上docker18.03.1-ce 部署jira7.12.0和mysql5.7
#下载需要用到的镜像
docker pull cptactionhank/atlassian-jira-software:7.12.0
docker pull mysql:5.7
#关必防火墙和selinux
systemctl disable firewalld && systemctl stop firewalld
sed -i 's|SELINUX=enforcing|SELINUX=disabled|g' /etc/selinux/config
#启动mysql的Docker实例
Docker run --name atlassian-mysql \
--restart always \
-p 3306:3306 \
-v /opt/mysql_data:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=passwd -d mysql:5.7
#进入mysql容器实例
docker exec -it atlassian-mysql /bin/bash
#在数据库界面创建jira数据库,并添加jira用户
create database jiradb default character set utf8 collate utf8_bin;
CREATE USER `jira`@`%` IDENTIFIED BY 'jira';
GRANT ALL ON *.* TO `jira`@`%` WITH GRANT OPTION;
alter user 'jira'@'%' identified with mysql_native_password by 'jira@111';
flush privileges;
#修改mysql事物隔离级别
set global transaction isolation level read committed;
set session transaction isolation level read committed;
#启动jira实例
docker run --detach --restart always \
--name atlassian-jira \
-v /data/atlassian/confluence:/home \
--link atlassian-mysql:mysql \
-p 8080:8080 \
cptactionhank/atlassian-jira-software:7.12.0
访问http://ip:8080
请按照下面插图一步一步创建:
#破解jira 426指jira实例容器的短id,需要破解包童鞋请留言哦!
docker exec --user root 426 mv /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/atlassian-extras-3.2.jar /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/atlassian-extras-3.2.jar_bak
docker cp atlassian-extras-3.1.2.jar 426:/opt/atlassian/jira/atlassian-jira/WEB-INF/lib/
#利用容器短id,重启atlassian-jira容器
docker restart 426