Giter Site home page Giter Site logo

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

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.

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.

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.

signing

#4 removed signing, please re-enable.

"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

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?

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.