TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Deploying Go servers with Docker

62 pointsby aarkayover 10 years ago

4 comments

simme_over 10 years ago
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.
regecksover 10 years ago
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 未加载
NateDadover 10 years ago
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 未加载
hoodoofover 10 years ago
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 未加载