The best way to build docker images in go 1.17

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • ko

    Build and deploy Go applications

    You might have a look at buildpacks. These are e.g. used by Cloud Run for fast building of application containers. I haven't tried it myself, though; I tend to use the Go-specific ko, mentioned elsewhere in this thread.

  • distroless

    🥑 Language focused docker images, minus the operating system.

    Run it with distroless, because of libc with net/http. Excellent example here : https://github.com/GoogleContainerTools/distroless/blob/main/examples/go/Dockerfile You can replace go get with go mod download

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • pack

    CLI for building apps using Cloud Native Buildpacks

    You might have a look at buildpacks. These are e.g. used by Cloud Run for fast building of application containers. I haven't tried it myself, though; I tend to use the Go-specific ko, mentioned elsewhere in this thread.

  • pacoloco

    Caching proxy server for Arch Linux pacman

    Pacoloco project uses simple and nice way to build images from scratch. See it here https://github.com/anatol/pacoloco/blob/master/Dockerfile

  • changelog

    A changelog generator which uses GitHub's API for the details (by jimschubert)

    I usually build with goreleaser and then include a specific binary only into a distroless image. You can see an example here: https://github.com/jimschubert/changelog

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts