Comments (5)
@vk496 good point! thanks for the feedback!
Certainly /usr/bin/qemu-i386-static
is not included in the result of docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
.
But it actually works.
Which kind of Linux distribution's i386 container do you want to run?
If you want to run ubuntu's i386 container image, using i386/ubuntu
image ( https://hub.docker.com/r/i386/ubuntu/ ) looks good.
Here is the i386 's case with the i386 image with the Travis CI.
You can refer this repository's "i386" case in .travis.yml
.
https://github.com/junaruga/ci-multi-arch-test/blob/master/.travis.yml#L24-L27
https://travis-ci.org/junaruga/ci-multi-arch-test/jobs/567486350
file
command shows 32-bit
for the compiled binary on the environment.
bin/hello
binary (C program to identity the environment) shows 32-bit.
$ file bin/hello
bin/hello: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib, for GNU/Linux 3.2.0, BuildID[sha1]=48eb3582abea27022b746ae6587bda9767896eaf, not stripped
$ bin/hello
Hello World!
Endian Type: Little-endian
Bit: 32-bit
Sizeof {int, long, long long, void*, size_t, off_t}: {4, 4, 8, 4, 4, 4}
The tricky point is when uname
command shows x86_64
, it can be actually i386 environment depending on the environment.
Because there are 2 types of architectures (architecture by uname
command and actual architecture such as used in a part of a deb or a RPM package name), though I do not understand it well.
Same CPU type's 32-bit binary can work on the 64-bit host environment.
When you want to run fedora i386 image, unfortunately it does not exist on both DockerHub and official container repo.
https://hub.docker.com/_/fedora
https://registry.fedoraproject.org/repo/fedora/tags/
from qemu-user-static.
Debian, Alpine and CentOS has the i386 image too.
i386/debian
: https://hub.docker.com/_/debian
i386/alpine
: https://hub.docker.com/_/alpine
i386/centos
: https://hub.docker.com/_/centos
If you just want to run 32-bit architecture's container, a Linux distribution's ARM-32 bit image can be the alternative of i386 such as arm32v7/fedora image: https://hub.docker.com/r/arm32v7/fedora/
from qemu-user-static.
Searched keywords: i386, i686, Intel 32-bit
from qemu-user-static.
Thanks for your reply! I was interesting in compile native i386 code.
It was recently added with the docker/buildx#128 petition.
from qemu-user-static.
Sure. Good news from docker buildx. I like it too. :)
from qemu-user-static.
Related Issues (20)
- [Feature Request] darwin-arm64 arch support
- bubblewrap does not work in aarch64 container on x86_64 host
- Does it support MacOS with M1? HOT 2
- how to pass --smp option
- iptables not working on docker arm64 alpine HOT 2
- ldd fails with qemu-aarch64 HOT 6
- Need support for run x86_64 on linux/arm64 HOT 13
- Intermittent exec format error when building linux/arm64 (alpine 3.15+) on amd64 host HOT 1
- speed is slow when use as cross-compile solution HOT 5
- qemu: uncaught target signal 11 (Segmentation fault) - core dumped HOT 1
- Does loong64 and mips/mipsle will be support?
- Where is qemu-$to_arch-static binary files when container whose arch isn't equal to host's one is run? HOT 8
- Undocumented convention: The `--reset` flag must be the first argument
- Mirror docker image to ghcr.io
- node.js 16 build on UBI8 is very slow and fails in GH Actions with ECONNRESET and too many open files errors.
- argv[0] can now be automatically fixed
- need to upgrade to support loongarch64 HOT 8
- [Problem] Can I use it in gitlab runner? HOT 4
- iptables-nft not supported in qemu-aarch64-static HOT 6
- Need pinned Alpine Linux versions, e.g., v3.17 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qemu-user-static.