How to resolve mkdtemp error building Go from source in Docker?

polaris · · 518 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>I&#39;m trying to compile Go for uClibc in Docker, using the base image xdrum/openwrt:15.05. I managed to work around a bunch of errors about obtaining the source (!) to do with HTTPS, SSL, and git support in OpenWrt.</p> <p>However, the <code>make.bash</code> script presents a strange error that I&#39;m not sure how to resolve.</p> <p>Dockerfile:</p> <pre><code>FROM xdrum/openwrt:15.05 RUN opkg update &amp;&amp; \ opkg install \ gcc \ git \ wget \ unzip \ ca-certificates &amp;&amp; \ wget https://github.com/golang/go/archive/release-branch.go1.4.zip &amp;&amp; \ unzip release-branch.go1.4.zip &amp;&amp; \ sh -c &#34;cd go-release-branch.go1.4/src &amp;&amp; sh make.bash&#34; </code></pre> <p>Trace:</p> <pre><code>$ docker build -t test . # Building C bootstrap tool. cmd/dist go tool dist: mkdtemp(/var/tmp/go-cbuild-SU5ZfI): No such file or directory </code></pre> <p>How can we fix the mkdtemp error in Docker?</p>

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

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