Building from Source

Pre-built binaries or three ways to compile โ€” no runtime dependencies either way.

โฌ‡๏ธ Pre-built Fastest

Download a static binary directly from the releases/ directory in the repo. No Go, no Docker required.

๐Ÿณ Docker Recommended

No local Go install required. build.sh cross-compiles all platforms in a golang:1.22-alpine container.

โšก From Source Go required

Clone and go build or make build for a quick local binary. make cross for all platforms.

RequirementDetailsStatus
Go 1.22+ Only needed for from-source builds. Docker build uses golang:1.22-alpine internally. โœ“ optional
Docker Only needed for the build.sh method. Any recent Docker Engine works. โœ“ optional
make Optional โ€” Makefile wraps the go build commands. You can invoke go build directly. โœ“ optional

Download and run immediately

Static binaries for every platform are committed to releases/v1.0.0/ in the repo.

๐Ÿง Linux amd64
curl -Lo tls-ca-fetch https://github.com/binRick/tls-ca-fetch/raw/main/releases/v1.0.0/tls-ca-fetch-linux-amd64
๐Ÿง Linux arm64
curl -Lo tls-ca-fetch https://github.com/binRick/tls-ca-fetch/raw/main/releases/v1.0.0/tls-ca-fetch-linux-arm64
macOS Apple Silicon
curl -Lo tls-ca-fetch https://github.com/binRick/tls-ca-fetch/raw/main/releases/v1.0.0/tls-ca-fetch-darwin-arm64
macOS Intel
curl -Lo tls-ca-fetch https://github.com/binRick/tls-ca-fetch/raw/main/releases/v1.0.0/tls-ca-fetch-darwin-amd64
linux amd64 install
# Download
$ curl -Lo tls-ca-fetch \
    https://github.com/binRick/tls-ca-fetch/raw/main/releases/v1.0.0/tls-ca-fetch-linux-amd64

# Make executable and install
$ chmod +x tls-ca-fetch
$ sudo mv tls-ca-fetch /usr/local/bin/

# Verify
$ tls-ca-fetch -version
tls-ca-fetch v1.0.0

Multi-platform build via build.sh

No local Go needed. The script pulls golang:1.22-alpine, cross-compiles all targets, and drops binaries into releases/.

build.sh โ€” docker cross-compile
# Clone
$ git clone https://github.com/binRick/tls-ca-fetch.git
$ cd tls-ca-fetch

# Build all platforms (specify version)
$ VERSION=v1.0.0 ./build.sh
Building tls-ca-fetch v1.0.0 ...
  โ†’ linux/amd64
  โ†’ linux/arm64
  โ†’ darwin/amd64
  โ†’ darwin/arm64
  โ†’ windows/amd64
Done. Binaries in releases/v1.0.0/

# Install
$ sudo cp releases/v1.0.0/tls-ca-fetch-linux-amd64 /usr/local/bin/tls-ca-fetch

From source with local Go

Requires Go 1.22+. make build produces a local binary. make cross cross-compiles all platforms.

make
$ git clone https://github.com/binRick/tls-ca-fetch.git
$ cd tls-ca-fetch

# Local binary
$ make build
go build -o tls-ca-fetch .

# Cross-compile all platforms
$ make cross
  โ†’ releases/v1.0.0/tls-ca-fetch-linux-amd64
  โ†’ releases/v1.0.0/tls-ca-fetch-linux-arm64
  โ†’ releases/v1.0.0/tls-ca-fetch-darwin-amd64
  โ†’ releases/v1.0.0/tls-ca-fetch-darwin-arm64
  โ†’ releases/v1.0.0/tls-ca-fetch-windows-amd64.exe

Fully static, zero runtime deps

CGO disabled and debug symbols stripped โ€” copy the binary to any machine of the same arch and it just works.

go build โ€” static
$ CGO_ENABLED=0 go build \
    -trimpath -ldflags="-s -w -extldflags=-static" \
    -o tls-ca-fetch .

# Confirm: no dynamic libraries
$ file tls-ca-fetch
tls-ca-fetch: ELF 64-bit LSB executable, x86-64, statically linked, stripped

# Copy anywhere
$ scp tls-ca-fetch user@server:/usr/local/bin/