Docker 安装 latest 的 Gerrit 版本
1、环境平台
虚拟机系统 Ubuntu 20.04.2 LTS
docker 的安装过程此处就不重复描述了,精彩的文章很多,我直接安装好进入下面的主题讲解了。
docker 版本信息如下:
查询可用的镜像
# docker search gerrit
开始拉取镜像
查看拉取镜像的版本信息
# docker inspect 12464400b
openfrontier/gerrit 版本的安装信息如下:
"DockerVersion": "",
"Author": "zsx <thinkernel@gmail.com>",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"29418/tcp": {},
"8080/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"LANG=en_US.UTF-8",
"LANGUAGE=en_US:en",
"LC_ALL=en_US.UTF-8",
"JAVA_VERSION=jdk-11.0.11+9",
"JAVA_HOME=/opt/java/openjdk",
"GERRIT_HOME=/var/gerrit",
"GERRIT_SITE=/var/gerrit/review_site",
"GERRIT_WAR=/var/gerrit/gerrit.war",
"GERRIT_VERSION=3.3.2",
"GERRIT_USER=gerrit2",
"GERRIT_INIT_ARGS=--install-plugin=delete-project --install-plugin=gitiles --install-plugin=plugin-manager",
"PLUGIN_VERSION=3.3",
"GERRITFORGE_URL=https://gerrit-ci.gerritforge.com",
"GERRITFORGE_ARTIFACT_DIR=lastSuccessfulBuild/artifact/bazel-bin/plugins"
],
"Cmd": [
"/gerrit-start.sh"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": {
"/var/gerrit/review_site": {}
},
"WorkingDir": "",
"Entrypoint": [
"/gerrit-entrypoint.sh"
],
另外一个版本
gerritcodereview/gerrit 版本的安装信息如下:
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"CANONICAL_WEB_URL=",
"HTTPD_LISTEN_URL="
],
"Cmd": [
"/bin/sh",
"-c",
"#(nop) ",
"ENTRYPOINT [\"/entrypoint.sh\"]"
],
"Image": "sha256:bd10e13c168cea93cd1a4ff866fb2563d7d503626bf6f849e387a9f8fc775fb3",
"Volumes": {
"/var/gerrit/cache": {},
"/var/gerrit/db": {},
"/var/gerrit/etc": {},
"/var/gerrit/git": {},
"/var/gerrit/index": {}
},
"WorkingDir": "",
"Entrypoint": [
"/entrypoint.sh"
],
"OnBuild": null,
"Labels": {
"org.label-schema.build-date": "20200611",
"org.label-schema.license": "GPLv2",
"org.label-schema.name": "CentOS Base Image",
"org.label-schema.schema-version": "1.0",
"org.label-schema.vendor": "CentOS"
}
},
"DockerVersion": "19.03.8",
"Author": "Gerrit Code Review Community",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "gerrit",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"29418/tcp": {},
"8080/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"CANONICAL_WEB_URL=",
"HTTPD_LISTEN_URL="
],
"Cmd": null,
"Image": "sha256:bd10e13c168cea93cd1a4ff866fb2563d7d503626bf6f849e387a9f8fc775fb3",
"Volumes": {
"/var/gerrit/cache": {},
"/var/gerrit/db": {},
"/var/gerrit/etc": {},
"/var/gerrit/git": {},
"/var/gerrit/index": {}
},
"WorkingDir": "",
"Entrypoint": [
"/entrypoint.sh"
],
使用不同的镜像,版本的部署是有差别的,一定要注意、定要注意、要注意。
接着创建容器,检查容器运行情况。
打开浏览器访问 gerrit 系统
可以看到安装的版本信息 Gerrit Code Review (3.3.2)