是注册表的JFrog产品组合枢轴或者是某组的附加功能?无论哪种方式,该功能都很有趣,但是很高兴了解细节。
artifactory docker kubernetes docker-registry jfrog-container-registry
我有两个 docker 存储库在同一个 JFrog 云帐户/实例上运行。一个用于内部候选版本,另一个用于潜在的外部 GC 版本。我希望能够构建 docker 镜像并推送到内部存储库,让 QA/UAT 进城,然后将镜像复制到发布存储库。我不希望从源重建图像。不幸的是,当我尝试拉取、标记然后推送图像时,出现错误:
未经授权:将带有清单 v2 架构 1 的 Docker 映像推送到此存储库被阻止。
两个存储库都阻止了模式 1 清单,但我正在向内部存储库推送良好的内容,因此我无法将相同的图像推送到发布存储库没有多大意义。
我已经设置了一个非常简单的测试来确认(实际存储库 URL 被审查):
% docker pull hello-world:latest
latest: Pulling from library/hello-world
0e03bdcc26d7: Pull complete
...
% docker tag hello-world:latest internal-rc.jfrog.io/hello-world:1.0.0-beta
% docker push internal-rc.jfrog.io/hello-world:1.0.0-beta
The push refers to repository [internal-rc.jfrog.io/hello-world]
9c27e219663c: Pushed
...
% docker system prune -a
...
Total reclaimed space: 131.8MB
% docker image pull internal-rc.jfrog.io/hello-world:1.0.0-beta
1.0.0-beta: Pulling from hello-world
0e03bdcc26d7: Pull complete …Run Code Online (Sandbox Code Playgroud) 用于列出 docker 标签的 JFrog REST api 获取 302。
文档:
用法:
GET /api/docker/{repo-key}/v2/{image name}/tags/list?n=<n from the request>&last=<last tag value from previous response>
Run Code Online (Sandbox Code Playgroud)
我的查询:
所以我的查询是:
回复:
GET /api/docker/{repo-key}/v2/{image name}/tags/list?n=<n from the request>&last=<last tag value from previous response>
Run Code Online (Sandbox Code Playgroud) 我启动容器注册表:
docker run --name artifactory -d -p 8081:8081 -p 8082:8082 docker.bintray.io/jfrog/artifactory-jcr:latest
Run Code Online (Sandbox Code Playgroud)
我能够使用 UI 登录并创建存储库等。
现在我想使用 CLI 登录:
docker login localhost:8082
Username: admin
Password:
Run Code Online (Sandbox Code Playgroud)
来自守护程序的错误响应:获取 http://localhost:8082/v2/:收到意外的 HTTP 状态:503 服务不可用
我究竟做错了什么?当我使用本地 192.168.xx 地址(并将其添加到不安全的注册表后)时,我遇到了同样的错误。
远程 Docker 似乎配置良好,但是当我尝试将任何映像下载到我的虚拟 docker 时,它总是失败并出现以下跟踪:
2020-04-01T16:20:32.969Z [jfrt ] [INFO ] [b6e7232e6d2e0cb4] [DockerV2VirtualRepoHandler:117] [http-nio-8081-exec-8] - Fetching docker manifest for repo 'thanosio/thanos' and tag 'latest'
2020-04-01T16:20:33.874Z [jfrt ] [ERROR] [b6e7232e6d2e0cb4] [.DockerV2RemoteRepoHandler:448] [http-nio-8081-exec-8] - Missing Manifest from docker-via-intranet 'v2/thanosio/thanos/manifests/latest' not found at docker-via-intranet:thanosio/thanos/latest/list.manifest.json
2020-04-01T16:20:34.703Z [jfrt ] [ERROR] [b6e7232e6d2e0cb4] [.DockerV2RemoteRepoHandler:448] [http-nio-8081-exec-8] - Missing Manifest from docker-remote 'v2/thanosio/thanos/manifests/latest' not found at docker-remote:thanosio/thanos/latest/list.manifest.json
2020-04-01T16:20:35.545Z [jfrt ] [ERROR] [b6e7232e6d2e0cb4] [.DockerV2RemoteRepoHandler:448] [http-nio-8081-exec-8] - Missing Manifest from quay-io 'v2/thanosio/thanos/manifests/latest' not found at quay-io:thanosio/thanos/latest/list.manifest.json
Run Code Online (Sandbox Code Playgroud) 我一直在使用 Artifactory OSS 并使用部署脚本对其进行设置。部署脚本还会在设置后立即将一些带有 curl 的图像上传到通用存储库。现在我还需要上传 docker 图像,所以我切换到 Artifactory JCR。在我接受 EULA 之前,JCR 不会接受我的 curl 推送。是否可以自动接受?我一直在文件和数据库中寻找 EULA 标志,但没有成功。
我的环境是在 Kubernetes 中带有 artifactory-jcr:6.17.0 的 docker 容器。
我创建了一个 JCR 远程存储库,当我尝试将它的 URL 设置为指向另一个云 JCR 时,单击“测试”按钮后,我收到错误代码“400 错误请求”。
“源”JCR 服务器上的错误是:
[WARN ] (o.a.r.RemoteRepoBase:449) - cloud-remote: Error in getting information for 'node/8.10/list.manifest.json' (java.lang.IllegalStateException: Can't fetch token for repo: cloud-remote realm: https://<server-name>-local.jfrog.io/<server-name>/api/docker/local/v2/token scope:repository:node:pull).
一直致力于设置 JFrog Container Repository 并且遇到了设置 Docker Repository Ports 的问题。
我已经完成并将 Nginx 设置为反向代理,并生成了一个工作站点可用的 conf 文件
## add ssl entries when https has been set in config
ssl_certificate /etc/nginx/ssl/secret.crt;
ssl_certificate_key /etc/nginx/ssl/secret.key;
ssl_session_cache shared:SSL:1m;
ssl_prefer_server_ciphers on;
## server configuration
server {
listen 443 ssl;
listen 80 ;
server_name subdomain.domain.com;
if ($http_x_forwarded_proto = '') {
set $http_x_forwarded_proto $scheme;
}
## Application specific logs
## access_log /var/log/nginx/artifactory.jfrog.com-access.log timing;
## error_log /var/log/nginx/artifactory.jfrog.com-error.log;
rewrite ^/$ /artifactory/webapp/ redirect;
rewrite ^/artifactory/?(/webapp)?$ /artifactory/webapp/ redirect;
chunked_transfer_encoding on;
client_max_body_size 0;
location / …Run Code Online (Sandbox Code Playgroud)