Package & Docker

The Go extension can produce release artifacts for Go projects, including Docker images.

Docker

When the docker publish channel is enabled, the Go extension generates a Dockerfile using gcr.io/distroless/static:nonroot as the base image and copies the statically linked binary.

{
  "publish": ["docker"]
}
putnami build api --target linux/amd64
putnami publish api --docker-registry ghcr.io/myorg

Options include:

  • --docker-registry <registry>
  • --docker-tag <tag>
  • --platform <platform>
  • --stable

Archives and module publishing

Go packaging can prepare platform archives and Go module source for release flows. Publishing to registries remains a separate CI step.

Use Putnami build output as the source of truth for release artifacts rather than rebuilding manually in deployment scripts.