# mysql启动
docker run -p 3306:3306 --name mysql8 \
-v /usr/local/docker/mysql/mysql-files:/var/lib/mysql-files \
-v /usr/local/docker/mysql/conf:/etc/mysql \
-v /usr/local/docker/mysql/logs:/var/log/mysql \
-v /usr/local/docker/mysql/data:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=123456 \
-d mysql:8.0.26
# 解决远程连接不上问题
docker exec -it [CONTAINER] /bin/bash
mysql -uroot -p123456
alter user 'root'@'%' identified with mysql_native_password by '123456';
flush privileges;
# gogs启动
docker pull gogs/gogs:0.13.0
docker run -it -d --name=gogs --restart=always --privileged -p 10022:22 -p 13000:3000 -v /data/gogs:/data gogs/gogs:0.13.0
# 端口开放
firewall-cmd --zone=public --add-port=13000/tcp --permanent
firewall-cmd --zone=public --add-port=10022/tcp --permanent
# 刷新
firewall-cmd --reload
# 访问http://主机ip:13000/install