Giter Club home page Giter Club logo

binfmt's Introduction

Binfmt

CI Status Go Report Card Docker Pulls

Cross-platform emulator collection distributed with Docker images.

Build local binaries

docker buildx bake

This builds the qemu-user emulator binaries for your local plaform to the bin directory.

Build test image

REPO=myuser/binfmt docker buildx bake --load mainline
docker run --privileged --rm myuser/binfmt

Prints similar to:

{
  "supported": [
    "linux/amd64",
    "linux/arm64",
    "linux/riscv64",
    "linux/ppc64le",
    "linux/s390x",
    "linux/386",
    "linux/arm/v7",
    "linux/arm/v6"
  ],
  "emulators": [
    "qemu-aarch64",
    "qemu-arm",
    "qemu-i386",
    "qemu-ppc64le",
    "qemu-riscv64",
    "qemu-s390x"
  ]
}

Installing emulators

docker run --privileged --rm tonistiigi/binfmt --install all
docker run --privileged --rm tonistiigi/binfmt --install arm64,riscv64,arm

Uninstalling emulators

docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-aarch64

Emulator names can be found from the status output.

You can also uninstall all archs for a specific emulator:

docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-*

Display version

docker run --privileged --rm tonistiigi/binfmt --version
binfmt/9a44d27 qemu/v6.0.0 go/1.15.11

Development commands

# validate linter
./hack/lint

# validate vendored files
./hack/validate-vendor

# update vendored files
./hack/update-vendor

# test, only run on nodes where you allow emulators to be installed in kernel
./hack/install-and-test

Test current emulation support

docker run --rm arm64v8/alpine uname -a
docker run --rm arm32v7/alpine uname -a
docker run --rm ppc64le/alpine uname -a
docker run --rm s390x/alpine uname -a
docker run --rm tonistiigi/debian:riscv uname -a

buildkit target

This repository also provides helper for BuildKit's automatic emulation support moby/buildkit#1528. These binaries are BuildKit specific and should not be installed in kernel with binfmt_misc.

Licenses

MIT. See LICENSE for more details. For QEMU see https://wiki.qemu.org/License

binfmt's People

Contributors

tonistiigi avatar crazy-max avatar stefanscherer avatar zelahi avatar akihirosuda avatar carlosedp avatar justincormack avatar tiborvass avatar dependabot[bot] avatar zhangwenlong8911 avatar

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.