← 全部工具

apko

热度 85 更新于 开发与构建

Build OCI images from APK packages directly without Dockerfile

homebrewauto-collected

安装

Homebrew
brew install apko

通过 Homebrew 安装。

apko: apk-based OCI image builder

Build and publish OCI container images built from apk packages.

apko has the following key features:

  • Fully reproducible by default. Run apko twice and you will get exactly the same binary.
  • Fast. apko aims to build images in ms.
  • Small. apko generated images only contain what's needed by the application,

in the style of distroless.

  • SBOM Support. apko produces a Software Bill of Materials (SBOM) for images, detailing all the packages inside.
  • Services. apko supports using the s6 supervision suite to run multiple processes

in a container without reaping or signalling issues.

Please note that apko is a work in progress and details are subject to change!

Installation

You can install apko from Homebrew:

brew install apko

You can also install apko from source:

go install chainguard.dev/apko@latest

You can also use the apko container image:

docker run cgr.dev/chainguard/apko version

To use the examples, you'll generally want to mount your current directory into the container, e.g.:

docker run -v "$PWD":/work cgr.dev/chainguard/apko build examples/alpine-base.yaml apko-alpine:edge apko-alpine.tar

Quickstart