轻量级CI/CD发布部署环境搭建及使用_03_docker安装harbor
轻量级CI/CD发布部署环境搭建及使用_03_docker安装harbor授人以鱼不如授人以渔,如果说的别人都没明白,说明自己实际也不是太明白 1,下载docker-composesudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-composehttps://img2023.cnblogs.com/blog/3030104/202303/3030104-20230301100701124-732411699.png2,赋予权限chmod +x /usr/local/bin/docker-composehttps://img2023.cnblogs.com/blog/3030104/202303/3030104-20230301100714481-1980620066.png3,下载Harbor离线安装包(建议:由于包在github上且近600M,用迅雷下载,拷贝链接即可下载,再上传至linux目录)最新:https://github.com/goharbor/harbor/releases2.4.0-rc1:https://github.com/goharbor/harbor/releases/tag/v2.4.0-rc1https://img2023.cnblogs.com/blog/3030104/202303/3030104-20230301100942236-183144584.png
上传tar包至相应目录,并解压tar xvf harbor-offline-installer-v2.4.0-rc1.tgzhttps://img2023.cnblogs.com/blog/3030104/202303/3030104-20230301101003244-1588717712.png4,解压至/usr/local目录(此步在上面离线安装已执行过则无需执行)tar -zxvf harbor-offline-installer-v2.0.1.tgz -C /usr/local/https://img2023.cnblogs.com/blog/3030104/202303/3030104-20230301101021766-1045386608.png5,进入相应目录,复制配置文件(备份原文件)cp /usr/local/harbor/harbor.yml.tmpl /usr/local/harbor/harbor.ymlhttps://img2023.cnblogs.com/blog/3030104/202303/3030104-20230301101043022-1915650600.png6,修改配置文件(不使用https访问,无需配置证书)cd /usr/local/harborvi harbor.ymlhttps://img2023.cnblogs.com/blog/3030104/202303/3030104-20230301101059977-226825631.png https://img2023.cnblogs.com/blog/3030104/202303/3030104-20230301101106483-1169476134.png
7,执行install.sh脚本(如没有安装python2,会自动下载安装)./install.sh没有权限,赋予权限:sudo chmod -R 777 /home/docker/harborhttps://img2023.cnblogs.com/blog/3030104/202303/3030104-20230301101130000-1373207525.png https://img2023.cnblogs.com/blog/3030104/202303/3030104-20230301101151013-1507478718.png期间启动hurbor会启动相关的容器,如本机已启动相关容器,确保名称、端口不要冲突,如冲突,只能修改https://img2023.cnblogs.com/blog/3030104/202303/3030104-20230301101207386-617651662.png成功显示如下https://img2023.cnblogs.com/blog/3030104/202303/3030104-20230301101221590-1508443096.png8,登录web控制台(http://ip:port)用户名:admin密码(未修改,默认):Harbor12345https://img2023.cnblogs.com/blog/3030104/202303/3030104-20230301101236143-1304397919.png重启:docker-compose stopdocker-compose up -d至此,轻量级CI/CD发布部署环境搭建及使用_03_docker安装harbor,完结轻量级CI/CD发布部署环境搭建及使用_01_基本介绍轻量级CI/CD发布部署环境搭建及使用_02_docker安装jenkins编写不易,如需转载,请注明出处
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
页:
[1]