简体   繁体   English

Windows docker容器中的jfrog-cli-x509:证书由未知授权机构签名

[英]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文件夹中

Copying from here 这里复制

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.

相关问题 Docker-X509:Windows 7中未知权限错误签署的证书 - Docker - x509:certificate signed by unknown authority error in windows 7 码头工人错误:x509:证书由未知授权机构签名 - docker error: x509: certificate signed by unknown authority x509:由未知机构签署的证书 - 使用 docker 和 github - x509: certificate signed by unknown authority - both with docker and with github Docker 私有注册表:x509:由未知权威签名的证书 - Docker Private Registry: x509: certificate signed by unknown authority Docker登录x509:证书由未知权威签署 - Docker login x509: certificate signed by unknown authority docker 容器中的 terraform init 错误 -- x509:证书由未知机构签名 - Error with terraform init in a docker container -- x509: certificate signed by unknown authority Windows上的docker工具箱,然后docker run hello-world获取x509:未知授权机构签名的证书 - docker toolbox on windows then docker run hello-world gets x509: certificate signed by unknown authority 在 docker 容器中创建对等通道失败:身份无效:x509:证书由未知机构签名 - Peer Channel Create in docker container fails with: identity is not valid: x509: certificate signed by unknown authority 私有 Docker 注册表:“x509:由未知机构签名的证书”仅适用于 Windows 映像 - Private Docker Registry: 'x509: certificate signed by unknown authority' only for Windows images Docker Windows 的桌面无法启用 kube.netes 并出现错误 x509:未知授权机构签署的证书 - Docker Desktop for Windows cannot enable kubernetes with error x509: certificate signed by unknown authority
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM