我的Dockerfile中包含以下代码:
FROM alpine/git as clone
WORKDIR /app
RUN git clone https://github.com/spring-projects/spring-petclinic.git
但是,我遇到此错误:
fatal: unable to access 'https://github.com/spring-projects/spring-petclinic.git/': SSL certificate problem: self signed certificate in certificate chain
我实际上有一个本地git,并且无法禁用SSL证书。
答案 0 :(得分:3)
尝试将git clone
之前的 添加到您的Dockerfile中:
RUN apk add --update \
ca-certificates \
&& update-ca-certificates
如前所述,您可以从此处使用HTTPS URL克隆存储库,例如:
https://username:password@some.company.com/project_name.git