Coder Social home page Coder Social logo

binfmt's Introduction

The Moby Project

Moby Project logo

Moby is an open-source project created by Docker to enable and accelerate software containerization.

It provides a "Lego set" of toolkit components, the framework for assembling them into custom container-based systems, and a place for all container enthusiasts and professionals to experiment and exchange ideas. Components include container build tools, a container registry, orchestration tools, a runtime and more, and these can be used as building blocks in conjunction with other tools and projects.

Principles

Moby is an open project guided by strong principles, aiming to be modular, flexible and without too strong an opinion on user experience. It is open to the community to help set its direction.

  • Modular: the project includes lots of components that have well-defined functions and APIs that work together.
  • Batteries included but swappable: Moby includes enough components to build fully featured container systems, but its modular architecture ensures that most of the components can be swapped by different implementations.
  • Usable security: Moby provides secure defaults without compromising usability.
  • Developer focused: The APIs are intended to be functional and useful to build powerful tools. They are not necessarily intended as end user tools but as components aimed at developers. Documentation and UX is aimed at developers not end users.

Audience

The Moby Project is intended for engineers, integrators and enthusiasts looking to modify, hack, fix, experiment, invent and build systems based on containers. It is not for people looking for a commercially supported system, but for people who want to work and learn with open source code.

Relationship with Docker

The components and tools in the Moby Project are initially the open source components that Docker and the community have built for the Docker Project. New projects can be added if they fit with the community goals. Docker is committed to using Moby as the upstream for the Docker Product. However, other projects are also encouraged to use Moby as an upstream, and to reuse the components in diverse ways, and all these uses will be treated in the same way. External maintainers and contributors are welcomed.

The Moby project is not intended as a location for support or feature requests for Docker products, but as a place for contributors to work on open source code, fix bugs, and make the code more useful. The releases are supported by the maintainers, community and users, on a best efforts basis only, and are not intended for customers who want enterprise or commercial support; Docker EE is the appropriate product for these use cases.


Legal

Brought to you courtesy of our legal counsel. For more context, please see the NOTICE document in this repo.

Use and transfer of Moby may be subject to certain restrictions by the United States and other governments.

It is your responsibility to ensure that your use and/or transfer does not violate applicable laws.

For more information, please see https://www.bis.doc.gov

Licensing

Moby is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

binfmt's People

Contributors

carlosedp avatar justincormack avatar stefanscherer avatar zelahi avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

binfmt's Issues

"bad record MAC" for linux/s390x

I am running into the following error:

#11 [builder 5/8] RUN go mod download
#11 0.445 go: github.com/pkg/[email protected]: Get https://proxy.golang.org/github.com/pkg/errors/@v/v0.9.1.mod: local error: tls: bad record MAC
#11 ERROR: executor failed running [/bin/sh -c go mod download]: buildkit-runc did not terminate successfully

I am using buildx under GCB - https://github.com/dims/go-runner.Looks like the same problem was spotted in another arch as well moby/moby#40240

Per https://bugs.launchpad.net/qemu/+bug/1847232, the problem has been fixed in QEMU 4.2

Request for answers/documentation

In the latest docker-for-win update, I saw that this project is mentioned in the changelog. It is also mentioned in the changelog of docker-for-mac:

Docker Desktop Community 2.1.0.1

QEMU was mentioned more than two years ago too:

Docker for Windows 1.13.0, 2017-01-19

  • Support for arm, aarch64, ppc64le architectures using qemu

Docker for Mac 1.13.0, 2017-01-19

  • Support for arm, aarch64, ppc64le architectures using qemu

Furthermore, there is an article about it in docs.docker.com/docker-for-mac/multi-arch, where it is said that up to four target architectures are supported: arm, mips, ppc64le, and even s390x. According to docker/docs#8211, it applies to docker-for-win too.

I also found that either this project is based on linuxkit/binfmt or the other way round. According to linuxkit/linuxkit#3342, pushing some change from here was/is expected (I couldn't find the PR that @StefanScherer mentioned, tho).


I am the maintainer of dbhi/qus, which comprises a set of scripts and docker images to run any of the following combinations:

  • Host: amd64, i386, arm64v8, arm32v7, arm32v6, s390x and ppc64le.
  • Target: amd64, i386, arm64v8, arm32v7, arm32v6, s390x, ppc64le, mips and mips64el.

The main differences compared to this project are:

  • In dbhi/qus:
    • Images for multiple host architectures are provided.
    • Additional target architectures are provided.
    • It is possible to optionally limit/select the list of QEMU binaries to be registered on the host.
    • It is possible to remove/reset all the registered interpreters.
  • In docker/binfmt:
    • The logic is embedded in a static binary written in golang.

NOTE: dbhi/qus is based on an enhanced qemu-binfmt-conf.sh and a companion register.sh script. As a result, a shell is required and images are based on busybox instead of scratch.


I'd like to understand which is the scope and which are the expected use cases of this project/repo, in order to update https://github.com/dbhi/qus#similar-projects-blog-posts-and-other-references accordingly and hopefully help enhance both projects. @StefanScherer, I'd be so glad if you could answer the following questions:

  • Is docker/binfmt automatically executed on both docker-for-win and docker-for-mac? If so, the latest changelog should have included e.g. for cross compiling for ARM, ARM64, s390x and others. instead of for cross compiling for ARM only, isn't it?
  • The list of target architectures in this project is aarch64, arm, ppc64le and s390x. However, in docs.docker.com/docker-for-mac/multi-arch, mips is listed instead of aarch64. Do the docs need an update?
  • What about a regular GNU/Linux host? AFAIK, the user needs to install/get qemu-user-static binaries and then register a set of target architectures with -p yes. I couldn't find any reference in the docs. I'd be so grateful if you could point me to any article. Alternatively, is any update to the docs planned regarding this image and QEMU support in docker?
  • Possible feature requests (just tell whether it is worth creating a separate issue for any of them):
    • Add missing target architectures (arm32v6, mips and mips64el) to this project.
    • Provide images for i386, arm64v8, arm32v7, arm32v6, s390x and ppc64le hosts, and convert docker/binfmt into a multi-arch manifest.
    • Add CLI options to the golang application to:
      • Select/limit the list of target architectures to be registered.
      • Clean a list of registered architectures.

Overall, I'd like to make dbhi/qus converge with docker/binfmt and linuxkit/binfmt.

signing

#4 removed signing, please re-enable.

Push tags to dockerhub

As commented in #15, images are pushed to dockerhub (hub.docker.com/r/docker/binfmt/tags), but there are digests only, no tags. It'd be useful to have docker/binfmt:latest and docker/binfmt:4.0.0 available.

Information on the installation process

This kind of installation through docker is pretty novel to me.

Could somebody provide some information on how this works?

I normally use my distribution's provided packages to setup binfmt. However, in this case I feel like I'll have a better chance of having buildx running if I use this image since it provides a version of qemu specifically patched for that purpose. Will the installation through this image interfere with the linux distribution packages in some way?

One last thing, once I run this image, where do the qemu-* binaries resides?

loadinternal: cannot find runtime/cgo

I'm trying to make and test this project in Travis CI with the following .travis.yml:

os: linux
services: docker
language: minimal
install: skip
script:
  - make clean
  - make
  - make test

The build (go-compile.sh) is showing loadinternal: cannot find runtime/cgo. Then, the test fails with Cannot write to /proc/sys/fs/binfmt_misc/register: write /proc/sys/fs/binfmt_misc/register: invalid argument. See https://travis-ci.com/dbhi/qus/builds/122668410#L2504-L2506 and https://travis-ci.com/dbhi/qus/builds/122668410#L2537.

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.