April 2019: Deployment discussion
Meetup #59. Please RSVP at Meetup.
We get started at 6:30 pm.
Sponsors
Venue provided by Startup Edmonton.
Food sponsored by Bellstone Engineering.
Talks
Go and Docker
Peter Preeper gave a hands-on introduction to packaging Go applications as Docker containers, starting with why Go is a good fit (statically compiled, single binary, garbage collection, CSP-style concurrency) and what containerization offers over VMs (smaller images, less configuration, reusable base images). He compared Dockerfile strategies: the convenience of golang:onbuild versus the control of FROM golang:latest, then showed how to shrink images dramatically with FROM scratch. The scratch approach required static linking (CGO_ENABLED=0 GOOS=linux go build -a) and hit a real-world snag — the HTTPS request to edmontongo.org failed because the image had no CA certificates, fixed by copying ca-certificates.crt into the container. The takeaway was to use scratch plus static linking to build tiny containers for microservices.
Key points:
- Go produces a single statically linked binary — ideal for containers.
golang:onbuildis quick but bloated and gives little control.golang:latest/version images give build control but add many layers.FROM scratchyields the smallest images.- Static linking (
CGO_ENABLED=0 GOOS=linux) is required forscratch. - Copy
ca-certificates.crtfor TLS/HTTPS to work in ascratchimage. - Use
scratch+ static linking for micro-containers/microservices.
Deployment Discussion
Deployment Discussion: All attendees will be invited to share their experience with deploying Go services.
Video
Video: Either Errors in Go 2 by Marcel Van Lohuizen, or Absolute Unit (Test) by Dave Cheney.
News
Events
- Monthly Hack Day - May 4
- Gocon Canada - May 31, Toronto
- GopherCon - Jul 24-27, San Diego
- Edmonton Go Meetup - May