Skip to content

devcontainers-community/features-bazel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Bazel Dev Container Feature

πŸ’š Installs Bazel tooling

{Fast, Correct} - Choose two

Build and test software of any size, quickly and reliably.

  • Speed up your builds and tests: Bazel rebuilds only what is necessary. With advanced local and distributed caching, optimized dependency analysis and parallel execution, you get fast and incremental builds.
  • One tool, multiple languages: Build and test Java, C++, Android, iOS, Go, and a wide variety of other language platforms. Bazel runs on Windows, macOS, and Linux.
  • Scalable: Bazel helps you scale your organization, codebase, and continuous integration solution. It handles codebases of any size, in multiple repositories or a huge monorepo.
  • Extensible to your needs: Easily add support for new languages and platforms with Bazel's familiar extension language. Share and re-use language rules written by the growing Bazel community.

β€” bazelbuild/bazel: a fast, scalable, multi-language and extensible build system

This Feature installs Bazel using Bazelisk. Then, it symlinks /usr/local/bin/bazel to the Bazelisk installation so that you can use bazel as normal through bazelisk. The main feature of Bazelisk is that it automatically uses the correct Bazel version based on things like $USE_BAZEL_VERSION, .bazeliskrc, .bazelversion, and more. This feature also installs the Bazel VS Code extension. Oh, and it also installs Buildifier for your convenience. πŸ˜‰

Usage

Codespaces Devcontainers

// devcontainer.json
"features": {
  "ghcr.io/devcontainers-community/features/bazel:1": {}
}

❓ Don't know what this ☝ means? Check out this VS Code blog post.

Options

You can specify a bazelisk_version and a buildifier_version to pin each of the tools like this:

// devcontainer.json
"features": {
  "ghcr.io/devcontainers-community/features/bazel:1": {
    "bazelisk_version": "v1.17.0",
    "buildifier_version": "v6.1.2"
  }
}