Go for DevOps
You're viewing a free preview. Sign in free to read every script.
Why this exists A Go build produces one file with everything inside it. That makes distribution easy: build for the target platform, copy the file, run it. It also makes container images tiny, because the image needs…
Cross-Compiling, Version Stamping and Tiny Container Images
Build one Go program for Linux, Windows and macOS from a single machine, stamp the version and commit into the binary, shrink it with build flags, and package it in a multi-stage Dockerfile that produces an image of a few megabytes.
Sign in free to read this script, along with the rest of the library.
Sign in free