distroless
melange
distroless | melange | |
---|---|---|
122 | 10 | |
17,749 | 357 | |
1.2% | 4.2% | |
9.4 | 9.8 | |
9 days ago | 2 days ago | |
Starlark | Go | |
Apache License 2.0 | Apache License 2.0 |
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.
distroless
-
Chainguard Images now available on Docker Hub
lots of questions here regarding what this product is. I guess i can provide some information for the context, from a perspective of an outside contributor.
Chainguard Images is a set of hardened container images.
They were built by the original team that brought you Google's Distroless (https://github.com/GoogleContainerTools/distroless)
However, there were few problems with Distroless:
1. distroless were based on Debian - which in turn, limited to Debian's release cadence for fixing CVE.
2. distroless is using bazelbuild, which is not exactly easy to contrib, customize, etc...
3. distroless images are hard to extend.
Chainguard built a new "undistro" OS for container workload, named Wolfi, using their OSS projects like melange (for packaging pkgs) and apko (for building images).
The idea is (from my understanding) is that
1. You don't have to rely on upstream to cut a release. Chainguard will be doing that, with lots of automation & guardrails in placed. This allow them to fix vulnerabilties extremely fast.
- Language focused Docker images, minus the operating system
-
Using Alpine can make Python Docker builds 50× slower
> If you have one image based on Ubuntu in your stack, you may as well base them all on Ubuntu, because you only need to download (and store!) the common base image once
This is only true if your infrastructure is static. If your infrastructure is highly elastic, image size has an impact on your time to scale up.
Of course, there are better choices than Alpine to optimize image size. Distroless (https://github.com/GoogleContainerTools/distroless) is a good example.
- Smaller and Safer Clojure Containers: Minimizing the Software Bill of Materials
-
Long Term Ownership of an Event-Driven System
The same as our code dependencies, container updates can include security patches and bug fixes and improvements. However, they can also include breaking changes and it is crucial you test them thoroughly before putting them into production. Wherever possible, I recommend using the distroless base image which will drastically reduce both your image size, your risk vector, and therefore your maintenance version going forward.
-
Minimizing Nuxt 3 Docker Images
# Use a large Node.js base image to build the application and name it "build" FROM node:18-alpine as build WORKDIR /app # Copy the package.json and package-lock.json files into the working directory before copying the rest of the files # This will cache the dependencies and speed up subsequent builds if the dependencies don't change COPY package*.json /app # You might want to use yarn or pnpm instead RUN npm install COPY . /app RUN npm run build # Instead of using a node:18-alpine image, we are using a distroless image. These are provided by google: https://github.com/GoogleContainerTools/distroless FROM gcr.io/distroless/nodejs:18 as prod WORKDIR /app # Copy the built application from the "build" image into the "prod" image COPY --from=build /app/.output /app/.output # Since this image only contains node.js, we do not need to specify the node command and simply pass the path to the index.mjs file! CMD ["/app/.output/server/index.mjs"]
-
Build Your Own Docker with Linux Namespaces, Cgroups, and Chroot
Lots of examples without the entire OS as other comments mention, an example would be Googles distroless[0]
[0]: https://github.com/GoogleContainerTools/distroless
-
Reddit temporarily ban subreddit and user advertising rival self-hosted platform (Lemmy)
Docker doesn't do this all the time. Distroless Docker containers are relatively common. https://github.com/GoogleContainerTools/distroless
-
Why elixir over Golang
Deployment: https://github.com/GoogleContainerTools/distroless
-
Reviews
Or use distroless image as it includes one, among others. https://github.com/GoogleContainerTools/distroless/blob/main/base/README.md
melange
- Chainguard Images now available on Docker Hub
- Melange: Build APKs from Source Code
-
Using GitLab Kubernetes Runners to Build Melange Packages
Recently, I came across Chainguard and wrote the article How to build Docker Images with Melange and Apko. As a fervent supporter of Kubernetes and GitLab CI, I was eager to experiment with building images using Melange in this particular setup. GitLab's shared Runners work seamlessly with Bubblewrap, eliminating the need for additional configurations. This post is intended for enthusiasts like myself, interested in hosting their own Kubernetes Runners and leveraging the Kubernetes Runner Type of Melange.
-
Distroless images using melange and apko
melange allows us to build .apk packages (compatible with apk, the package manager used by Alpine Linux distro) using declarative YAML pipelines.
-
Building a Go Package with Melange and a Docker Image with Apko
Melange
-
Distroless container images with Apko from Chainguard
Apko's synergy with Melange allows custom package creation for container images. Together, they offer a powerful solution for building containers directly from source code.
-
There are two levels of isolation when building Linux packages
In Wolfi's packaging system (melange) we setup a hermetic build environment. See here:
http://github.com/wolfi-dev/os
https://github.com/chainguard-dev/melange
We use this to build APK packages from source for a large set of software.
-
aws-cli v2: how much smaller can it get? Answer: a lot smaller :)
I'm going to use melange for packaging. I write melange package's manifest in YAML and melange spits out APK file for me.
-
Vulnerability scanner written in Go that uses osv.dev data
Depends exactly what you're trying to create it for. I advocate for doing it during the build process rather than as a step after.
We open sourced a few tools that do it automatically for containers:
https://github.com/chainguard-dev/apko
https://github.com/chainguard-dev/melange
-
Apko: A Better Way To Build Containers?
Melange is a builder for Alpine packages. It uses pipelines similar to common CI/CD services, and it builds for multiple architectures by default. Here is a simplified example of a package build for the forum software NodeBB:
What are some alternatives?
iron-alpine - Hardened alpine linux baseimage for Docker.
apko - Build OCI images from APK packages directly without Dockerfile
spring-boot-jib - This project is about Containerizing a Spring Boot Application With Jib
osv-scanner - Vulnerability scanner written in Go which uses the data provided by https://osv.dev
jib - 🏗 Build container images for your Java applications.
maloss - Towards Measuring Supply Chain Attacks on Package Managers for Interpreted Languages
podman - Podman: A tool for managing OCI containers and pods.
aws-c-auth - C99 library implementation of AWS client-side authentication: standard credentials providers and signing.
dockerfiles - Various Dockerfiles I use on the desktop and on servers.
nodeBB - Node.js based forum software built for the modern web
docker-alpine - Official Alpine Linux Docker image. Win at minimalism!
packj - Packj stops :zap: Solarwinds-, ESLint-, and PyTorch-like attacks by flagging malicious/vulnerable open-source dependencies ("weak links") in your software supply-chain