阅读背景:

无法在AWS Kubernetes集群上设置JFrog Artifactory Pro(试用版)而无需反向代理(“存储库路径”Docker访问方法)

来源:互联网 

I have installed JFrog Artifactory Pro Trial(v5.8.3) on Kubernetes cluster on AWS using the official Helm chart:

我使用官方Helm图表在AWS上的Kubernetes集群上安装了JFrog Artifactory Pro Trial(v5.8.3):

helm install --name artifactory stable/artifactory

I have mapped the ELB launched by the Artifactory chart to Route53 DNS entry jfrogartifactory.qdatalabs.com

我已将Artifactory图表启动的ELB映射到Route53 DNS条目jfrogartifactory.qdatalabs.com

I'm able to access the Jfrog application on the URL: jfrogartifactory.qdatalabs.com

我可以通过URL访问Jfrog应用程序:jfrogartifactory.qdatalabs.com

Now, I want to push Docker images from my local machine to Artifactory. I have set up Docker repository on Artifactory and want to expose it without using a reverse proxy. I have chosen 'Repository Path' as the Docker Access Method in the HTTP Settings Configuration:

现在,我想将Docker镜像从本地机器推送到Artifactory。我在Artifactory上设置了Docker存储库,并希望在不使用反向代理的情况下公开它。我在HTTP设置配置中选择了“存储库路径”作为Docker访问方法:

I have chosen 'Embedded Tomcat' in the reverse proxy settings:

我在反向代理设置中选择了“嵌入式Tomcat”:

The HTTP Settings in the Advanced settings page of docker, docker-local and docker-remote are auto-populated like this:

docker,docker-local和docker-remote的高级设置页面中的HTTP设置是自动填充的,如下所示:

I'm getting a 200 response on the following URL: https://jfrogartifactory.qdatalabs.com/artifactory/api/docker/docker/v2

我在以下网址上得到了200条回复:http://jfrogartifactory.qdatalabs.com/artifactory/api/docker/docker/v2

However, I'm getting 404 response on the following URL: https://jfrogartifactory.qdatalabs.com/v2/

但是,我在以下网址上收到了404回复:http://jfrogartifactory.qdatalabs.com/v2/

On my local machine, I have added jfrogartifactory.qdatalabs.com to the insecure registries by editing the /etc/docker/daemon.json:

在我的本地机器上,我通过编辑/etc/docker/daemon.json将jfrogartifactory.qdatalabs.com添加到不安全的注册表中:

After reloading the Docker daemon, I can see the URL added to the insecure registries:

重新加载Docker守护程序后,我可以看到添加到不安全的注册表的URL:

I have also enabled anonymous access to the registry. But when I try to pull an image or login to the directory, I get 500 Internal Server error:

我还启用了对注册表的匿名访问。但是当我尝试拉取图像或登录目录时,我收到500内部服务器错误:

Please help with any pointers or any obvious mistakes I maybe doing.

请帮助我可能正在做的任何指针或任何明显的错误。

1 个解决方案

#1


1  

  • When adding jfrogartifactory.qdatalabs.com, you also need to specify the port Artifactory is running on. e.g. jfrogartifactory.qdatalabs.com:8081 Then, reload the Docker daemon.

    添加jfrogartifactory.qdatalabs.com时,还需要指定正在运行的Artifactory端口。例如jfrogartifactory.qdatalabs.com:8081然后,重新加载Docker守护进程。

    • Then, when you try to login through the Docker client, you should run the following: docker login -u {USER_NAME} -p {USER_PASSWORD} jfrogartifactory.qdatalabs.com:8081

      然后,当您尝试通过Docker客户端登录时,应运行以下命令:docker login -u {USER_NAME} -p {USER_PASSWORD} jfrogartifactory.qdatalabs.com:8081

    • To pull an image, you need to specify the Docker virtual repo name as part of the request. If you're using a virtual repository named docker-virtual, you should run the following: docker pull jfrogartifactory.qdatalabs.com:8081/docker-virtual/hello-world

      要拉取图像,您需要将Docker虚拟仓库名称指定为请求的一部分。如果您使用名为docker-virtual的虚拟存储库,则应运行以下命令:docker pull jfrogartifactory.qdatalabs.com:8081/docker-virtual/hello-world

Hope that helps.

希望有所帮助。


分享到: