Gerrit 环境搭建(基于Docker)

官网:https://www.gerritcodereview.com
文档:https://review.gerrithub.io/Documentation/index.html
插件文档:https://www.gerritcodereview.com/plugins.html
源码:https://github.com/GerritCodeReview
镜像库:https://hub.docker.com/r/gerritcodereview/gerrit

运行命令

docker run -d \
    --name gerrit3.3 \
    -p 7001:8080 \
    -p 7002:29418 \
    -e CANONICAL_WEB_URL=http://10.8.6.179:7001 \
    gerritcodereview/gerrit:3.3.1

关键参数解释:

  • -p 7001:8080 -p 7002:29418:8080为http端口;29418为ssh端口
  • -e CANONICAL_WEB_URL=http://10.8.6.179:7001
    • CANONICAL_WEB_URL 为外部访问地址(体现在git clone地址上)