[英]jfrog-cli in windows docker container - x509: certificate signed by unknown authority
I was trying to upload build artifacts from windows docker container to our hosted artifactory. 我试图将构建工件从Windows docker容器上传到我们的托管工件。 I get this error
x509: certificate signed by unknown authority
, when running docker build. 运行docker build时,我收到此错误
x509: certificate signed by unknown authority
。 I am using Windows server 2016 VM with docker installed. 我正在使用安装了docker的Windows Server 2016 VM。 I have corporate proxy on the server.
我在服务器上有公司代理。 I downloaded the jfrog.exe (jfrog version 1.20.2) from https://jfrog.com/getcli/ to Windows VM.
我从https://jfrog.com/getcli/下载了jfrog.exe(jfrog版本1.20.2)到Windows VM。 Then copied the executable jfrog.exe to windows docker contaier.
然后将可执行文件jfrog.exe复制到Windows docker contaier。 Is it the right way to install/copy the jfrog-cli in windows docker container?
是在Windows docker容器中安装/复制jfrog-cli的正确方法吗? I am not sure what certificates are missing?
我不确定缺少哪些证书?
Below is the sample dockerfile: 以下是示例dockerfile:
FROM docker_registry/deploytools as deploy
ARG ARTIFACTORY_WEBSITE="https://.../artifactory"
ARG ARTIFACTORY_USER=""
ARG ARTIFACTORY_APIKEY=""
ARG ARTIFACTORY_ROOT_PATH=""
WORKDIR C:\\build
SHELL ["cmd", "/S", "/C"]
RUN echo "Deploying artifacts...." &&\
C:\tools\7-Zip\7z.exe a artifacts.dv.zip C:\buid\artifacts &&\
C:\tools\JFROG-CLI\jfrog rt config --url %ARTIFACTORY_WEBSITE% --user %ARTIFACTORY_USER% --apikey %APIKEY% &&\
C:\tools\JFROG-CLI\jfrog rt u "artifacts.dv.zip" %ARTIFACTORY_ROOT_PATH% --build-name=artifacts.dv --flat=false &&\
C:\tools\JFROG-CLI\jfrog rt bp artifacts.dv &&\
CMD cmd
The x509 error you mentioned seems to indicate that the certificates used to connect to Artifactory (as specified by the ARTIFACTORY_WEBSITE
variable) are not trusted. 您提到的x509错误似乎表明不信任用于连接到Artifactory的证书(由
ARTIFACTORY_WEBSITE
变量指定)。 If you have the certificates, you can add them to your docker container and place them in the .jfrog/security
folder 如果您拥有证书,则可以将它们添加到您的
.jfrog/security
容器中并将其放置在.jfrog/security
文件夹中
JFrog CLI supports accessing Artifactory over SSL using self-signed certificates as follows:
Under your user home directory, you should find a directory named .jfrog (this directory is created by the JFrog CLI first time it is used).
Under .jfrog, create a directory called security
Place your SSL certificate in your ~/.jfrog/security directory
To add them to your docker image during the build of the image, you can use the ADD
command in your Dockerfile 要将它们添加到构建映像期间的Docker映像中,可以在Dockerfile中使用
ADD
命令
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.