docker run -it --link atlassian-mysql:mysql --rm mysql sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"' #登录Mysql并管理
create database jira default character set utf8mb4 collate utf8mb4_unicode_ci; #创建数据库 CREATE USER `jira`@`%` IDENTIFIED BY 'jiraJIRA123!';GRANT ALL ON *.* TO `jira`@`%` WITH GRANT OPTION; #创建用户 create database conf default character set utf8 collate utf8_bin; #创建数据库 CREATE USER `conf`@`%` IDENTIFIED BY 'confCONF123!';GRANT ALL ON *.* TO `conf`@`%` WITH GRANT OPTION; #创建用户
set global transaction isolation level read committed;#事物隔离 set session transaction isolation level read committed;#事物隔离 exit; 退出
docker run --detach --restart always -v /data/atlassian/jira:/home --publish 8099:8099 cptactionhank/atlassian-jira-software docker run --detach --restart always -v /data/atlassian/confluence:/home --publish 8097:8097 cptactionhank/atlassian-confluence
登录到jira的容器
1
docker ps -a #查看所有容器
示例如下:
1 2 3 4
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES cc9aaa7835f3 cptactionhank/atlassian-confluence "/docker-entrypoin..." 18 minutes ago Up 8 minutes 8090-8091/tcp, 0.0.0.0:8097->8097/tcp jovial_mirzakhani 4a9496e6d836 cptactionhank/atlassian-jira-software "/docker-entrypoin..." 18 minutes ago Up 11 minutes 8080/tcp, 0.0.0.0:8099->8099/tcp stupefied_hoover 8bd26b5c59fe mysql:5.7 "docker-entrypoint..." 3 hours ago Up 3 hours 0.0.0.0:3306->3306/tcp atlassian-mysql
找到jira的容器,并登录
1 2
docker exec -i -t 4a9496e6d836 bash #登录 vi /opt/atlassian/jira/conf/server.xml