Giter Site home page Giter Site logo

rules_apt's Introduction

Bazel rules for .deb packages

A ruleset for downloading .deb packages, and including their contents as layers in container images.

NOTE: this ruleset is heavily inspired by distroless

Features

  • Pinning of the Debian snapshot to use
  • Pinning of packages using a single lockfile
  • Fine-grained control over packages (and their dependencies) to exclude
  • Fine-grained control over package priorities
  • Compatible with rules_oci

Shortcomings

  • There is no way to know which packages are already contained in previous layers, thus you have to be careful how you craft your package repository.

Installation

From the release you wish to use: https://github.com/sin-ack/rules_apt/releases copy the Bzlmod snippet into your MODULE.bazel file.

To use a commit rather than a release, use git_override:

# Version is optional when git_override is used.
bazel_dep(name = "rules_apt", version = "")

git_override(
    module_name = "rules_apt",
    commit = "58f8cec394363be9a3d53e7fbcbfd9c3b408cd1e",
    remote = "https://github.com/sin-ack/rules_apt.git",
)

You can also use local_path_override if you intend to vendor the ruleset, but don't do that.

Usage

Usage of this ruleset involves three main steps:

  1. Generating a lockfile
  2. Downloading packages
  3. Consuming packages

Examples

Public API Docs

rules_apt's People

Contributors

betaboon avatar sin-ack avatar renovate[bot] avatar stewartbutler avatar

rules_apt's Issues

Re-parallelize fetching of packages

I switched it over to repository_ctx.download during the refactor but that makes it download one-by-one. Figure out how rules_python does it nice and parallel while having it play nice with Bzlmod.

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.