<p>Im messing around with some docker stuff and I am trying to get an image to build using the docker go client. Heres the relevant code: <a href="https://gist.github.com/robotmayo/b1f5c7002100a5cf62582499f730c2fd" rel="nofollow">https://gist.github.com/robotmayo/b1f5c7002100a5cf62582499f730c2fd</a>
Heres the error I get: </p>
<pre><code>Error response from daemon: Cannot locate specified Dockerfile: Dockerfile
</code></pre>
<p>Any idea where I might be going wrong here?</p>
<hr/>**评论:**<br/><br/>nmarley: <pre><p>This is not a Go question, but a Docker question. Do you have a Dockerfile? What command are you running to get this error that you're pasting? Can you paste that command exactly?</p></pre>robotmayo: <pre><p>There is no command, I am using the docker go client directly.</p></pre>nmarley: <pre><p>What Docker Go client are you referring to? Do you have a link?</p>
<p>Also, it looks like your gist is an incomplete snippet w/just 2 funcs. Can you share the entire codebase that's giving you the error?</p>
<p>It looks like you're trying to do a <code>docker build</code> but you aren't supplying any Dockerfile for the image (whether that <code>Dockerfile</code> text needs to be written to a file or can be passed via string is another story, because I don't know how you're trying to build the image).</p></pre>robotmayo: <pre><p>The entire thing is those two functions. You need to make a tarball with the Docker file and send it to the Docker daemon which is what I am doing, well trying to do. Somewhere in those two functions I am doing something wrong and Im not sure what. Im using the docker go client. <a href="https://godoc.org/github.com/docker/docker/client#Client.ImageBuild" rel="nofollow">https://godoc.org/github.com/docker/docker/client#Client.ImageBuild</a></p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
0 回复
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传