我已经设置了私有注册表docker run -t -i -p 5000:5000 registry,它可以从192.168.59.103:5000访问(我正在使用boot2docker).现在我已经拉了一个图像tutum/tomcat,当我尝试将image(docker push 192.168.59.103:5000/tomcat)标记为192.168.59.103:5000/tomcat后将其推入注册表中我面临以下错误,如下所示 -
FATA[0004] Error: v1 ping attempt failed with error: Get https://192.168.59.103:5000/v1/_ping: EOF. If this private regi
stry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 192.168.59.103:5000` to
the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag
; simply place the CA …Run Code Online (Sandbox Code Playgroud) 我有一个服务器(让我们命名为A)可以访问互联网,我可以从officiel docker.io注册表中提取图像.
我还有其他服务器(B,C)出于安全原因不能进行相同的访问,但是可以访问A.
我还决定在A上安装一个私有注册表,可以在B和C中使用.
是否有可能让这个注册表充当代理,当我想从B中提取官方图像时,它可以通过A完成?
当图像被推送到注册表V2时,图像ID是否也会被推送到注册表中?是否可以从V2注册表获取某个存储库的图像ID?
我将docker镜像推送到我的私人注册表一次,但当我想再次推送该图像时,我收到了以下消息:
06-Sep-2016 10:54:10 Error response from daemon: Conflict: Tag latest is already set to image 2bcc77ac3ef5f5ce0442d9cae3652c0464b8f266db9ccd65b1638aadf60ebc39, if you want to replace it, please use -f option
The push refers to a repository [localhost.com:5000/proj/proj1] (len: 1)
06-Sep-2016 10:54:10 2bcc77ac3ef5: Image already exists
06-Sep-2016 10:54:10 2bcc77ac3ef5: Image already exists
06-Sep-2016 10:54:10 4f3b96c826b8: Image already exists
06-Sep-2016 10:54:11 84c030e02a98: Image already exists
06-Sep-2016 10:54:11 c7282372eb99: Image already exists
06-Sep-2016 10:54:11 1b449d63ca4e: Image already exists
Run Code Online (Sandbox Code Playgroud)
我每次都运行这些命令来在注册表中更新我的图像:
docker tag proj1 localhost.com:5000/proj/proj1
docker push localhost.com:5000/proj/proj1
Run Code Online (Sandbox Code Playgroud) docker dockerfile docker-registry docker-compose docker-machine
我想在自我修复的AWS ECS集群上运行一个私有的,安全的,经过身份验证的docker注册表.群集设置已完成且工作正常,但我很难开始registry:latest运行.问题是,每次我推送图像时,推动blob失败,并进入重试周期,除非我得到超时.
为了确保我的ECS设置不是阻止程序,我尝试使用Docker4Mac 1.12.0-a在本地设置所有内容.
首先,非常基本的设置工作.我创建了自己的注册表图像版本,在那里我将我的TLS证书包和密钥以及必要的htpasswd文件直接放入图像中.[我知道,这是不安全的,我只是为了测试目的而这样做].所以这是我的Dockerfile:
FROM registry:latest
COPY htpasswd /etc/docker
COPY server_bundle.pem /etc/docker
COPY server_key.pem /etc/docker
Run Code Online (Sandbox Code Playgroud)
server_bundle.pem我的域名(CN =*.mydomain.com)的通配符证书mydomain.com是第一个,后面是中间CA证书,因此客户应该感到高兴.我的htpasswd文件是使用推荐的方法创建的:
docker run --entrypoint htpasswd registry:2 -Bbn heyitsme mysupersecurepassword > htpasswd
Run Code Online (Sandbox Code Playgroud)
我建立了我的形象:
docker build -t heyitsme/registry .
Run Code Online (Sandbox Code Playgroud)
然后我运行一个非常基本的版本,没有TLS和身份验证:
docker run --restart=always -p 5000:5000 heyitsme/registry
Run Code Online (Sandbox Code Playgroud)
我实际上可以拉动,标记和重新推送图像:
docker pull alpine
docker tag alpine localhost:5000/alpine
docker push localhost:5000/alpine
Run Code Online (Sandbox Code Playgroud)
这有效.接下来,我通过环境变量进行TLS和基本身份验证:
docker run -h registry.mydomain.com --name registry --restart=always -p 5000:5000 \
-e REGISTRY_HTTP_HOST=http://registry.mydomain.com:5000 \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/etc/docker/server_bundle.pem …Run Code Online (Sandbox Code Playgroud) 如果当前正在使用Dockerfile构建映像并且我对该Dockerfile本身执行了一些更改,它是否会影响构建的后续步骤?
我想知道是否有API可以获取顶级Docker Hub映像?
就像打开https://hub.docker.com/explore/时可以得到的一样
我检查过:
https://docs.docker.com/engine/api/v1.28/#和 https://docs.docker.com/registry/spec/api/
但是没有找到我想要的。
如何获得存在于注册表中的 Docker 镜像的最新创建日期?最近我们遇到了一个问题,在我们的一些集群从服务器上没有自动拉取Docker镜像,并且项目运行在非常过时的容器环境中。所以我希望每天运行一次 cron 脚本来检查拉取的 Docker 镜像是否比注册 Docker 镜像早 24 小时。
我拥有Nexusv3.6,并创建了一个Docker存储库docker-repo(类型:托管)和一个Docker组docker-group(类型:group)。我都启用了HTTPS连接器:
docker-repo在港口8101和docker-group在港口8102。
我加docker-repo了docker-group。
现在,我可以docker-repo像这样直接将图像推入/拉出:
docker push myhost.com:8101/mymimage:latest
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试像这样推动该小组时:
docker push myhost.com:8102/docker-repo/mymimage:latest
Run Code Online (Sandbox Code Playgroud)
我收到一条错误消息: error parsing HTTP 404 response body: invalid character '<' looking for beginning of value
任何想法在这里有什么问题?
我正在使用docker swarm 模式主机将我的注册表中的一些图像部署到我的应用程序服务器中:
我在注册表中的图像看起来像这样(正在执行docker images):
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost:5000/myApp G02R00C09_myTag c1fc2242f9a0 2 hours ago 272MB
Run Code Online (Sandbox Code Playgroud)
在我的 docker compose 文件下,我的服务如下所示:
---
version: '3.4'
services:
ihm:
image: myRegistryServer:5000/myApp:G02R00C09_myTag
stdin_open: true
volumes:
- /opt/logs:/opt/logs
tty: true
ports:
- target: 80
published: 80
protocol: tcp
mode: host
deploy:
mode: global
placement:
constraints:
- node.labels.type == abc
healthcheck:
disable: true
Run Code Online (Sandbox Code Playgroud)
->执行后docker stack deploy:
我得到了我的筹码和我的服务以及运行(当我运行docker stack ls和docker service ls,一切正常)
-> …
docker dockerfile docker-registry docker-compose docker-swarm
docker ×10
docker-registry ×10
dockerfile ×3
boot2docker ×1
docker-image ×1
docker-swarm ×1
dockerhub ×1
nexus ×1