1、在 jenkins 中构建镜像时,报错:repository registry-vpc.cn-beijing.aliyuncs.com/cmc/centos-nginx112-php72 not found: does not exist or no pull access。如图1
RUN chown -R nginx:nginx /mcloud/www/ && / rm -rf /etc/nginx/conf.d/status.conf && / chmod +x /usr/local/bin/composer && / composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ && / cd /mcloud/www/cmcp-api && / composer install
2、调整配置项,Build – Execute shell – Command,用户名与密码的值需要修改。如图2
#!/bin/bash docker login --username= --password= registry-vpc.cn-beijing.aliyuncs.com
3、再次构建,构建成功。如图3
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/251066.html