mkctr

command module
v0.0.0-...-4b034f9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2023 License: BSD-3-Clause Imports: 21 Imported by: 0

README

mkctr: cross platform container builder for go

mkctr is a small go binary which uses GOOS= GOARCH= go build directly to compile go binaries and then uses go-containerregistry to create and publish the new containers based on the desired platforms.

This is inspired by ko which is awesome but doesn't support multiple binaries in a single container.

Usage

mkctr \
  --base="ghcr.io/tailscale/alpine-base:3.14" \
  --gopaths="\
    tailscale.com/cmd/tailscale:/usr/local/bin/tailscale, \
    tailscale.com/cmd/tailscaled:/usr/local/bin/tailscaled" \
  --tags="latest" \
  --repos="tailscale/tailscale" \
  [--target=<target>] \ # e.g. flyio
  [--push] \
  [--] [<cmd>...]

mkctr auto discovers GOOS/GOARCH from the specified base image. If the base image supports multiple platforms, binaries are compiled for each platform as long as it's one of linux/amd64, linux/386, linux/arm, linux/arm64.

Maturity

This is under active development. While Tailscale uses it, backwards compatability is not guaranteed, and some functionality is missing.

Documentation

Overview

mkctr builds the Tailscale OCI containers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL