我看到它~/.dockercfg有您的登录凭据,但它是您的电子邮件,而不是您的用户名.我看到运行docker login显示您的用户名并提示您更改它.但是,您可以将用户名添加到构建脚本中吗?
我们想在开始部署之前自动检查公共注册中心(Docker Hub)中是否存在图像.使用v1 API,我们只会查询https://index.docker.io/v1/repositories/gliderlabs/alpine/tags/3.2示例.
但是现在注册表的官方API是v2,检查公共注册表中图像是否存在的官方方法是什么?
V1
$ curl -i https://index.docker.io/v1/repositories/gliderlabs/alpine/tags/latest
HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Tue, 11 Aug 2015 10:02:09 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Vary: Cookie
X-Frame-Options: SAMEORIGIN
Strict-Transport-Security: max-age=31536000
[{"pk": 20307475, "id": "5bd56d81"}, {"pk": 20355979, "id": "511136ea"}]
Run Code Online (Sandbox Code Playgroud)
v2:
$ curl -i https://index.docker.io/v2/repositories/gliderlabs/alpine/tags/latest
HTTP/1.1 301 MOVED PERMANENTLY
Server: nginx/1.6.2
Date: Tue, 11 Aug 2015 10:04:20 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
X-Frame-Options: SAMEORIGIN
Location: https://index.docker.io/v2/repositories/gliderlabs/alpine/tags/latest/
Strict-Transport-Security: max-age=31536000
$ curl -i https://index.docker.io/v2/repositories/gliderlabs/alpine/tags/latest/
HTTP/1.1 301 MOVED …Run Code Online (Sandbox Code Playgroud) 我试图从私人bitbucket存储库进行自动构建.自动构建在此之前一直在运行,但今天早上开始出错.请帮忙.
我已经尝试重新链接bitbucket repo并删除并重新创建了自动构建.
请参阅下面的构建日志.
Cloning into 'bfvya69v2qo7eevzf2mpncv'...
Warning: Permanently added the RSA host key for IP address '131.103.20.168' to the list of known hosts.
KernelVersion: 3.13.0-40-generic
Os: linux
BuildTime: Mon Oct 12 05:37:18 UTC 2015
ApiVersion: 1.20
Version: 1.8.3
GitCommit: f4bf5c7
Arch: amd64
GoVersion: go1.4.2
Step 0 : FROM dsninjas/sailsjs-base:1.5.2
Authentication is required.
```
I just realized that bitbucket is having some issues with ssh. I don't know if this could be the problem but might be useful information.
http://status.bitbucket.org/incidents/n0bxvgvdbvdy …Run Code Online (Sandbox Code Playgroud) 我有一个运行应用程序的Docker Hub容器.通常它会通过克隆源git repo来运行应用程序,但是在我想运行特定版本的情况下,应用程序已经标记了各种版本.例如我可以做一个
git clone https://github.com/author/application.git
git checkout release-1.0.0
Run Code Online (Sandbox Code Playgroud)
作为Docker Hub维护者,我想用容器镜像软件的版本.除了在发布时手动执行此操作还有其他选择吗?
现在我的Dockerfile包含这样的东西:
ENV APP_VER=2.0.0
RUN git clone ...; git checkout ${APP_VER}
Run Code Online (Sandbox Code Playgroud)
在这个例子中,我将保留docker文件的标记分支,将APP_VER设置为2.1.0,然后Docker Hub支持,但是如果我对repo进行更改,我不清楚如何不对Dockerfile进行更改每个分支.
我有两个主机,每个都安装了docker.
众所周知,每个docker都将图像存储在本地/var/lib/docker目录中.
因此,如果我想使用某些图像,例如ubuntu,我必须执行docker pull从每个主机的互联网下载.
我认为这很慢.
我可以将图像存储在共享磁盘阵列中吗?然后让一些主机拉一次图像,允许每个可以访问共享磁盘的主机直接使用该图像.
是可能还是好的做法?为什么docker不是这样设计的?
它可能需要破解docker的源代码来实现它.
如果不是为什么boot2docker不能用于生产?是什么东西,coreOS带来的boot2docker没有?
我正在使用我在本地成功构建的Dockerfile尝试我的第一个Docker Hub自动构建.在Docker Hub上,它输出失败
Cloning into 'brx9syjpjlk9bnmymmynwpl'...
Warning: Permanently added the RSA host key for IP address '104.192.143.2' to the list of known hosts.
KernelVersion: 3.13.0-40-generic
Os: linux
BuildTime: Mon Oct 12 05:37:18 UTC 2015
ApiVersion: 1.20
Version: 1.8.3
GitCommit: f4bf5c7
Arch: amd64
GoVersion: go1.4.2
Step 0 : FROM ubuntu:14.04
---> c4bea91afef3
Step 1 : ARG
Unknown instruction: ARG
Run Code Online (Sandbox Code Playgroud)
我发现没有办法将build-arg传递给自动构建,但是我的ARG的默认值是理智的,所以这无关紧要.
任何想法这里的问题是什么?
我正在尝试使用Docker Hub专用存储库将映像部署到几个生产服务器.我想在不将个人Docker Hub凭据存储在服务器上的情况下完成此任务(最好避免设置专用的部署用户).
有什么概念上类似于GitHub的部署密钥吗?
DockerHub 和 GitHub 有什么区别?DockerHub 可以代替 GitHub 还是仅用于镜像?如果是,它与 Nexus 和其他二进制管理工具有何不同?
在 Docker Hub 镜像中有为每个镜像层运行的命令列表。这是一个 golang示例。
一些应用程序还在GitHub 中提供了它们的Dockerfile。这是一个 golang示例。
根据Docker Hub镜像层,ADD file:4b03b5f551e3fbdf47ec609712007327828f7530cc3455c43bbcdcaf449a75a9 in /是第一条命令。图像层没有包含任何“FROM”命令,它似乎也不足以满足ADD 定义。
所以这里是问题:
ADD file:<HASH> in /意思?这是什么格式?FROM图像,但似乎没有 API。ADD file:<HASH> in /语法构建 dockerfile ?有什么方法可以使用这种语法构建图像,或者在两种格式之间进行转换?dockerhub ×10
docker ×9
bitbucket ×1
boot2docker ×1
coreos ×1
docker-image ×1
dockerfile ×1
git ×1
github ×1