go-swagger + docker

blov · · 966 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hi,</p> <p>I&#39;m experimenting with go-swagger and really quite liking it so far. One thing I&#39;m unsure is now how to build / deploy rest services using docker with that code gen step.</p> <p>So currently my services are built using docker (golang image) and the compiled artifacts get put into a busybox container to be run / its that image that is published.</p> <p>The only way I can see go-swagger working here is by writing a little script that gets the swagger binary and generates the server API before its all compiled. I don&#39;t want to be manually generating and/or committing compiled code into vcs.</p> <p>Just wandering what other people do here or if there is an easier way?</p> <p>Thanks.</p> <hr/>**评论:**<br/><br/>robbert229: <pre><p>I reccoment looking at twitchtv&#39;s retool. Its like glide but for dependencies. </p> <p>Also beware that the goswagger binary can generate code for a different version than the library it uses. </p> <p>Thats why retool and vendoring your source are super importabt for a stable experience</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

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