查看docker的镜像
docker images
重启容器
docker restart ecece58c23ba
删除容器
docker rm 72e707ed2f2f
停止容器
docker stop confluence
docker容器启动自动启动某个容器
docker update --restart=always 9274671a14ed
查询docker容器时间
docker exec 14806b328545 date
进入容器控制面板
docker exec -it b3926b731141 /bin/bash
docker exec -it gitlab bash
容器内部查找某个文件
find / -name atlassian-extras-decoder-v2-3.4.1.jar
开机自动启动docker的某个容器
docker update --restart=always b3926b731141
进入gitlab容器控制面板
docker exec -it b3926b731141 gitlab-rails console
修改gitlab管理员的账号密码
user = User.find_by_username('root')# 默认管理员的find_by_username是root
user = User.where(id: 1).first # 默认管理员的ID一般是1
user.password = '新密码'
user.password_confirmation = '新密码'
user.save!
拉取 镜像
docker pull jenkinsci/blueocean
重启docker某个容器
docker restart 72e707ed2f2f
查看docker版本
docker -v
搭建gitlab
docker run \
-itd \
-p 80:80 \
-p 9922:22 \
-v /home/gitlab/etc:/etc/gitlab \
-v /home/gitlab/log:/var/log/gitlab \
-v /home/gitlab/opt:/var/opt/gitlab \
--restart always \
--privileged=true \
--name gitlab \
gitlab/gitlab-ce
搭建confluence
docker run --name mysql -p 3306:3306 -v /usr/local/docker/mysql5.7/conf/my.cnf:/etc/my.cnf -v /usr/local/docker/mysql5.7/data:/var/lib/mysql -v /usr/local/docker/mysql5.7/log:/logs -e MYSQL_ROOT_PASSWORD=admin123456 --restart=always -d mysql:5.7
docker run \
-d \
--name confluence \
--restart=always \
--privileged=true \
-p 9999:8090 \
-p 8091:8091 \
-v /usr/local/docker/confluence7:/var/atlassian/application-data/confluence \
atlassian/confluence-server:7.15.1
docker exec -it ecece58c23ba /bin/bash
find / -name "atlassian-extras-decoder-v2-3.4.1.jar" -print 2>/dev/null
docker cp 14806b328545:/opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.4.1.jar /home/d/atlassian-extras-decoder-v2-3.4.1.jar
docker cp /home/d/atlassian-extras-decoder-v2-3.4.1.jar 14806b328545:/opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.4.1.jar
docker cp /home/d/mysql-connector-java-5.1.49-bin.jar 14806b328545:/opt/atlassian/confluence/confluence/WEB-INF/lib/mysql-connector-java-5.1.49-bin.jar
设置mysql数据库隔离
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
mysql> SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
Query OK, 0 rows affected (0.00 sec)
mysql> SELECT @@global.tx_isolation;
route add -p 192.168.10.0 mask 255.0.0.0 192.168.10.1
标签:--,gitlab,atlassian,confluence,mysql,docker From: https://www.cnblogs.com/1994xiaojian/p/17930628.html