{"id":20314858,"url":"https://github.com/windvalley/harbor-install","last_synced_at":"2026-05-05T18:35:05.765Z","repository":{"id":163372286,"uuid":"258704513","full_name":"windvalley/harbor-install","owner":"windvalley","description":"docker harbor setup easily.","archived":false,"fork":false,"pushed_at":"2020-05-14T12:15:04.000Z","size":2,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T00:23:38.641Z","etag":null,"topics":["centos7","docker","docker-compose","harbor"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/windvalley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-25T06:35:23.000Z","updated_at":"2022-09-22T18:16:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"06dabf80-f3fc-44e8-86ea-184b9f53fb79","html_url":"https://github.com/windvalley/harbor-install","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/windvalley/harbor-install","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windvalley%2Fharbor-install","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windvalley%2Fharbor-install/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windvalley%2Fharbor-install/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windvalley%2Fharbor-install/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/windvalley","download_url":"https://codeload.github.com/windvalley/harbor-install/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/windvalley%2Fharbor-install/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281185256,"owners_count":26457745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["centos7","docker","docker-compose","harbor"],"created_at":"2024-11-14T18:16:59.289Z","updated_at":"2025-10-26T22:33:45.226Z","avatar_url":"https://github.com/windvalley.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Name\n\n一键部署企业级Docker私有镜像仓库.\n\n# Depolyment\n\n## 环境准备\n\n- CentOS7+\n- Docker CE\n- Docker Compose\n\n请提前安装好Docker, 并启动Docker服务, 提前安装好`docker-compose`命令.\n\n确保root用户能找到docker和docker-compose命令:\n```bash\nwhich docker\nwhich docker-compose\n```\n\n\n## 执行安装脚本\n\n提前设置好`harbor_install.sh`脚本中的前3个变量:\n\n- `HARBOR_FQDN`, harbor服务的域名, 比如`reg.sre.im`, 解析到你部署harbor的服务器ip上.\n- `CERT_PUB`, harbor服务域名的证书公钥**全路径**名称.\n- `CERT_KEY`, harbor服务域名的证书私钥**全路径**名称.\n\n\u003e 如果`CERT_PUB`和`CERT_KEY`只要有一个为空, 将使用自签证书.\n\n使用`root`用户或`sudo`来执行`harbor_install.sh`脚本进行自动安装:\n```bash\nsudo bash harbor_install.sh\n```\n\n# Test\n\n### 安装目录\n\nharbor被默认安装在`/usr/local/harbor/harbor`目录,\n可以切换到该目录执行`docker-compose`命令操作harbor服务.\n\n`docker-compose`详细配置文件:\n`/usr/local/harbor/harbor/docker-compose.yml`\n\n### 宿主机上的数据存储目录\n\n`/data/`\n\n### 宿主机上的服务日志目录\n\n`/var/log/harbor/`\n\n### 管理harbor服务\n\n已设置systemd的harbor服务, 可通过如下命令管理harbor服务.\n```bash\nsudo systemctl stop harbor\nsudo systemctl start harbor\nsudo systemctl status harbor\n```\n### 命令行登录harbor\n\n```bash\ndocker login -u admin -p Harbor12345 $HARBOR_FQDN\n```\n\n### 上传镜像到harbor\n\n```bash\ndocker image tag python:3.8 $HARBOR_FQDN/library/python:3.8\ndocker image push $_\n```\n\n### Web UI\n\n浏览器访问`https://$HARBOR_FQDN`, 管理员用户名密码: `admin/Harbor12345`\n\n\n### 其他\n\n#### 修改默认服务端口\n\n如果想使用其他端口代替默认的`80`和`443`, 请手动修改如下文件:\n\n`/usr/local/harbor/harbor/docker-compose.yml`\n\n比如想使用8080和8443代替默认的`80`和`443`, 只需:\n\n```\n    ports:\n      - 80:8080\n      - 443:8443\n```\n修改为:\n```\n    ports:\n      - 8080:8080\n      - 8443:8443\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindvalley%2Fharbor-install","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwindvalley%2Fharbor-install","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwindvalley%2Fharbor-install/lists"}