TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Deploying Go servers with Docker

62 点作者 aarkay超过 10 年前

4 条评论

simme_超过 10 年前
They demonstrated an easy way to deploy a Go application utilizing Docker ( <a href="https://docker.com/" rel="nofollow">https:&#x2F;&#x2F;docker.com&#x2F;</a> ) and Google App Engine. The Docker Engine container comprises just the application and its dependencies. It runs as an isolated process in userspace on the host operating system, sharing the kernel with other containers. Thus, it enjoys the resource isolation and allocation benefits of VMs but is much more portable and efficient.<p>If you take a look at the example&#x27;s source at: <a href="https://github.com/golang/example/blob/master/outyet/main.go" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;golang&#x2F;example&#x2F;blob&#x2F;master&#x2F;outyet&#x2F;main.go</a><p>You will notice, that they import &quot;net&#x2F;http&quot;<p>Which implements an http server - that&#x27;s all, see here for more details: <a href="https://godoc.org/net/http" rel="nofollow">https:&#x2F;&#x2F;godoc.org&#x2F;net&#x2F;http</a> It is not necessary, nevertheless possible, to use something like nginx or apache in front of a Go web application.
regecks超过 10 年前
This seems strange to me. What is the point of installing Go on (presumably) your production servers? Seems like you could just an easily cross-compile a release binary and put THAT in the Docker image.
评论 #8375661 未加载
NateDad超过 10 年前
I find this to be somewhat wacky. Go applications are portable by design. There&#x27;s no dependencies in the first place. As long as your web servers don&#x27;t clash on ports or directories, you can deploy as many as you want, built with a dozen different versions of go.
评论 #8376564 未加载
评论 #8375880 未加载
评论 #8375680 未加载
hoodoof超过 10 年前
What does this mean - is a &quot;Go server&quot; an application without a base operating system image?<p>If not, why is this significant or different?
评论 #8375488 未加载
评论 #8375498 未加载