Giter VIP home page Giter VIP logo

apko's Introduction

apko: APK-based OCI image builder

Build OCI images for apk-based distributions declaratively!

Why

When maintaining images at scale, the Dockerfile concept built into Docker is inefficient. If we have a collection of build artifacts, repositories and a keyring, we can build images directly with APK, and upload them directly to container registries.

In fact, we can do more than that: using a service like kontain.me, we can serve fresh container images on demand, with the latest package updates, using nothing but declarative configuration.

How

This part is very much a work in progress, but basically you need a system with apk (soon: libapk), and this apko tool. You probably also want the other Chainguard stack components as well, e.g. crane.

To build an image, use the apko build command:

# apko build config.yaml tag output.tar

This will give you a Docker-style tarball which you can use with docker load:

# docker load < output.tar

You can also publish an image using the apko publish command:

# apko publish config.yaml foo.dev/bar/baz:latest

You need root, or at least fakeroot + fakechroot to build images with apko, due to apk-tools' use of chroot(2).

Some example configurations are available in the examples directory.

Features

Sub-second image build times

By using the very fast apk package manager to manage build artifacts, we can build images very quickly. This means that developers win with a faster and more easy to reproduce build process.

Service bundles

Some containers are complex, with multiple tightly-coupled services running in the same container. apko understands this scenario out of the box, avoiding the need to deal with things like s6-overlay. If you define a service-bundle entrypoint, it will generate an appropriate supervision tree and ensure s6 is installed.

SBOM (coming soon)

As a result of using apk to manage distribution and build artifacts, we will be able to generate SBOMs for containers, using the new apk-tools 3.x SBOM feature.

apko's People

Contributors

cpanato avatar dependabot[bot] avatar developer-guy avatar imjasonh avatar kaniini avatar kruskall avatar mattmoor avatar panekj avatar puerco avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.