Giter Club home page Giter Club logo

binpot's Introduction

Binpot

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

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 ๐Ÿ’ก

  • The Docker image tags for qmcgaw/binpot follow the following formatting:
    • :name for the latest stable version of the program name
    • :name-v0.0.0 for the semver version of the program name
  • Each Docker image is based on scratch and only contain the binary program at the path /bin.
  • Each Docker image and binary program is built for each of the possible CPU architecture supported by Docker, unless indicated otherwise.
  • Each binary has permissions 500 (read and execute for the user owner)
  • You can change the ownership in the COPY command using --chown=1000 for example, without duplicating the binary in your Docker image layers.
  • Each Docker image has an entrypoint [ "/bin" ] so you can run it as well

Need help? โ–ถ๏ธ Create a discussion

Thinking of copying the binary for your host?

Programs available

Program Last version Image tags Architectures
bit v1.1.2 Docker Hub all
buildx v0.12.1 Docker Hub all
compose v2.24.5 Docker Hub all
dlv v1.22.0 Docker Hub linux/amd64 and linux/arm64
docker v25.0.2 Docker Hub all
gh v2.43.1 Docker Hub all
golangci-lint v1.55.2 Docker Hub all
gomock v1.6.0 Docker Hub all
gomodifytags v1.16.0 Docker Hub all
go-outline 9736a4b Docker Hub all
gopkgs v2.1.2 Docker Hub all
goplay v1.0.0 Docker Hub all
gopls v0.14.2 Docker Hub all
gotests v1.6.0 Docker Hub all
helm v3.14.0 Docker Hub all
impl v1.2.0 Docker Hub all
kubectl v1.29.1 Docker Hub all
kubectx v0.9.5 Docker Hub all
kubens v0.9.5 Docker Hub all
logo-ls v1.3.7 Docker Hub all
logo-ls v1.3.7 Docker Hub all
mockery v2.40.1 Docker Hub all
mockgen v1.6.0 Docker Hub all
stern v1.28.0 Docker Hub all
supervisord v0.7.3 Docker Hub all

โ„น๏ธ 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

  • Change version of go-outline once a release tag is made: Github issue

binpot's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

binpot's Issues

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.