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.

Ask HN: Do I need to containerize my Go service?

1 pointsby ingvulabout 4 years ago
I have a Go service (it&#x27;s a simple CRUD web server) that I want to deploy to one of my Digital Ocean droplets. My idea was to have mainly two things in my droplet: nginx, and a single binary (my Go service). The binary would be built in our CI pipeline.<p>Now, my colleague says that it would be better to deploy a Docker container (the image would be built in our CI pipeline). We do containerize PHP and Python apps (and I see the value of doing it), but I just don&#x27;t see the added value of deploying Docker containers for Go apps in production (I think it even introduces a small performance penalty, since the Go binary wouldn&#x27;t be running &quot;bare metal&quot; in my droplet).

1 comment

papafabout 4 years ago
Personally I don&#x27;t use Docker containers for Go applications, but there is nothing wrong with putting everything in Docker for consistency. Most projects I know use Docker, even when its not needed, just for the consistency.<p>One minimal Docker option with Go is to use a &quot;distroless&quot; Docker image: <a href="https:&#x2F;&#x2F;github.com&#x2F;GoogleContainerTools&#x2F;distroless&#x2F;blob&#x2F;main&#x2F;examples&#x2F;go&#x2F;Dockerfile" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;GoogleContainerTools&#x2F;distroless&#x2F;blob&#x2F;main...</a>