Home

Awesome

Binpot

The statically compiled, cross architecture, Docker based, binaries pot.

<img height="150" src="https://raw.githubusercontent.com/qdm12/binpot/main/binpot.svg">

Blog post

MIT

Usage

The usage is focused to build other Docker images.

For example:

FROM alpine:3.14
COPY --from=qmcgaw/binpot:helm /bin /usr/local/bin/helm

🔍 Search for all image tags 💡

Need help? â–ļī¸ Create a discussion

Thinking of copying the binary for your host?

Programs available

ProgramLast versionImage tagsArchitectures
bitv1.1.2Docker Huball
buildxv0.17.1Docker Huball
composev2.29.7Docker Huball
dlvv1.23.1Docker Hublinux/amd64 and linux/arm64
dockerv27.3.1Docker Huball
ghv2.58.0Docker Huball
gofumptv0.7.0Docker Huball
golangci-lintv1.61.0Docker Huball
gomockv1.6.0Docker Huball
gomodifytagsv1.17.0Docker Huball
go-outline9736a4bDocker Huball
gopkgsv2.1.2Docker Huball
goplayv1.0.0Docker Huball
goplsv0.16.2Docker Huball
gotestsv1.6.0Docker Huball
helmv3.16.2Docker Huball
implv1.2.0Docker Huball
kubectlv1.31.1Docker Huball
kubectxv0.9.5Docker Huball
kubensv0.9.5Docker Huball
logo-lsv1.3.7Docker Huball
logo-lsv1.3.7Docker Huball
mockeryv2.46.2Docker Huball
mockgenv1.6.0Docker Huball
sternv1.31.0Docker Huball
supervisordv0.7.3Docker Huball

ℹī¸ all architectures means: linux/amd64, linux/386, linux/arm64, linux/arm/v7, linux/arm/v6, linux/ppc64le, linux/s390x, linux/riscv64

Want more!? â–ļī¸ Create an issue!

How it works

  1. For each program, a Dockerfile describes how to build it. The final binary is placed on a final scratch based Docker image. Example: helm has ./dockerfiles/helm/Dockerfile
  2. For each program, a Github Action workflow is triggered when its Dockerfile or the workflow itself is changed. This workflow takes care of:
    1. Cross build the program for all CPU architectures
      • If one architecture is not supported such as for dlv, build the unavailable program
    2. Pushing the images containing the program to Docker Hub

Note on dlv

💁 Concerning dlv: all images are built for all architectures even if the program does not support all of them. A substitute Go program printing dlv v1.7.0 is unavailable on <platform name> and exiting with exit code 1 is used for unsupported platforms. This is like so so you can still cross build with all the architectures, especially if the program is an optional dependency. This is often the case for VSCode development containers for instance. In this case, if you try to build for arm/v7 and need dlv as an optional dependency, your COPY --from=qmcgaw/binpot:dlv will not fail.

Copy the binary on your host

If you want to use the binary directly on your host, you can do it with Docker. This has the advantage that it will automatically get the right binary for your host platform.

In the following we want to install helm on our host.

For example:

export PROGRAM="helm" && \
  docker pull "qmcgaw/binpot:$PROGRAM" && \
  containerid="$(docker create qmcgaw/binpot:$PROGRAM)" && \
  docker cp "$containerid:/bin" "/usr/local/bin/$PROGRAM" && \
  docker rm "$containerid"

Test Helm works with helm

TODOs