我的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证书。
在git clone
之前尝试并添加到您的Dockerfile:
RUN apk add --update \
ca-certificates \
&& update-ca-certificates
从那里,如评论所示,您可以使用HTTPS URL克隆repo,如:
https://username:[email protected]/project_name.git