bazel-nix-example
dinker
Our great sponsors
bazel-nix-example | dinker | |
---|---|---|
3 | 2 | |
26 | 12 | |
- | - | |
0.0 | 10.0 | |
about 1 year ago | 3 months ago | |
Starlark | Go | |
- | ISC License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
bazel-nix-example
-
Crafting container images without Dockerfiles
I put together an example that mixes Nix and Bazel a couple of years ago: https://github.com/jvolkman/bazel-nix-example
Nix is used to build a base Docker image, and Bazel builds layers on top.
-
Optimizing Docker image size and why it matters
It sounds so cool, but then I don’t get out of the base image before you’re writing your own Python launcher in a heredoc in a shell script in a docker image builder in a mix derivation[0]? Curiosity compels me to ask: how did all that become necessary?
[0]: https://github.com/jvolkman/bazel-nix-example/blob/e0208355f...
-
Building Container Images with Nix
Not sure of any writing that ties all of the pieces together, but I made a small example for you: https://github.com/jvolkman/bazel-nix-example
dinker
-
Crafting container images without Dockerfiles
(Self plug) I had the same thoughts as the author, and made this: https://github.com/andrewbaxter/dinker . Like stated in the article, if you're doing rust or go all you want is to dump the binary in the image. There's no reason to do the build inside the docker vm in that case, and it's super fast, and only uses dumb filesystem access - no daemons like docker, weird wip container managers like buildah, etc.
-
Rails on Docker · Fly
Self hoisting here, I put this together to make it easier to generate single (extra) layer docker images without needing a docker agent, capabilities, chroot, etc: https://github.com/andrewbaxter/dinker
Caveat: it doesn't work on Fly.io. They seem to be having some issue with OCI manifests: https://github.com/containers/skopeo/issues/1881 . They're also having issues with new docker versions pushing from CI: https://community.fly.io/t/deploying-to-fly-via-github-actio... ... the timing of this post seems weird.
FWIW the article says
> create a Docker image, also known as an OCI image
I don't think this is quite right. From my investigation, Docker and OCI images are basically content addressed trees, starting with a root manifest that points to other files and their hashes (root -> images -> layers -> layer configs + files). The OCI manifests and configs are separate to Docker manifests and configs and basically Docker will support both side by side.
What are some alternatives?
template-nixos - The NixOS template, configured for Gitpod (www.gitpod.io) to give you pre-built, nix based ephemeral operating system environments in the cloud.
buildah - A tool that facilitates building OCI images.
dive - A tool for exploring each layer in a docker image
manifest-tool - Command line tool to create and query container image manifest list/indexes
nix-prefetch-github - Prefetch sources from github for nix build tool
lamby - 🐑🛤 Simple Rails & AWS Lambda Integration
nixpkgs - Nix Packages collection & NixOS
nix2container - An archive-less dockerTools.buildImage implementation
jib - 🏗 Build container images for your Java applications.
dockerfile-rails - Provides a Rails generator to produce Dockerfiles and related files.
conda-docker - Create minimal docker images from conda environments
rules_nixpkgs - Rules for importing Nixpkgs packages into Bazel.