~/talk

Developing Go apps with Docker

Talkat Docker Community All-Hands #6 · on Thursday, 2022-09-01· [go]
slides:none on file

Shows how to Dockerize a Go HTTP server (Go 1.18.1) by copying go.mod, running go mod download, building with go build -o codedocker, and running the binary in a container exposing host port mapping 8081 → 8080; demonstrates caching/layering pitfalls so dependency steps don’t rerun on code changes. Replaces bulky golang:buster build image with an alpine final stage via a multi-stage Dockerfile, cutting the initial ~913 MB image down to a much smaller runtime image; the container runs successfully.

AI-written summary · about

  1. 0:00Start
  2. 4:35Create a Docker File
  3. 5:31Base Image
  4. 9:11Build the App
  5. 11:48Build this Docker File
  6. 15:40Best Practices
  7. 16:41Additional Dependencies
  8. 19:04Create a Build for Our Docker File
  9. 24:57Multi-Stage Pattern
  10. 25:39Multi-Stage Pattern in Docker
  11. 25:59Multi-Stage Builds
  12. 28:20Adding some Environment Variables for Go
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.