Help building a docker image using the docker go client

blov · · 547 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<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&#39;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&#39;s giving you the error?</p> <p>It looks like you&#39;re trying to do a <code>docker build</code> but you aren&#39;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&#39;t know how you&#39;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

547 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传