You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 11, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 11, 2019. It is now read-only.
Docker itself officially supports only the 64bit arch.
I don't know how the uname command works, and why it should give the wrong answer. Maybe you are trying it on a 64bit machine and it is just telling the truth.
Read again my post. Build scripts are using calls like dpkg-architecture -qDEB_HOST_ARCH which indirectly call uname -m. Compiling in this 32bit container will make debian buildfiles trying to build a 64bit executable which will fail because libraries and compiler don't match this target. the linux32 command changes how the kernel reports the architecture to the called process and all its children. I can simply demonstrate this without docker:
alias doesn't work in scripts and Dockerfiles, but ENTRYPOINT ["/usr/bin/linux32", "--"] solved my problem. The Docker docs are huge. I didn't find a place which says that using ENTRYPOINT is stupid
Reacted by Remi Rampin, Michael T. DeGuzis, Ingemar Fransson, Joshua Carter, theirishkiwi and Bryan Weber
This replaces /bin/sh with a script which transparently runs the original /bin/sh under /usr/bin/linux32. You can do the same for /bin/bash if you like.
Your code will fix direct calls to the uname binary but anything using the system call directly will still be broken. You fix a very small part of the issue here.
@remram44 You're thinking about an idealized solution. I'm presenting a practical one. The title of this issue is uname -m shows wrong architecture. My solution solves that problem.
You should consider working for Volkswagen. "See? The tests pass now!" You could also replace uname by a script that always prints "i686" no matter the command-line?
What's the point of lying to the user while apt-get, compilers and everything else will still explode in his face?
ioft/u386-ubuntu has been fixed, so it's what I'll use. Unsubscribing from this version that does not seem supported anyway.
Unsubscribing from this version that does not seem supported anyway.
Yes guys, this is a simple solution, built for simple people, by a simple guy, who does not even need to use it anymore. Actually I don't understand anything at all from the discussion above. So, if you can find any better solution, please follow it.
Alternatively, you can try to improve this one (just for the sake of the namespace: docker-32bit). If you need access rights for this, please ask me.
@remram44 We cannot apply such a fix because the script does not create a Dockerfile, but rather uses Docker directly.
@dashohoxha Given your last statement, do you think it would make sense to deprecate the repo officially in the Readme and link to the alternative @remram44 mentioned?
Given your last statement, do you think it would make sense to deprecate the repo officially in the Readme and link to the alternative @remram44 mentioned?
My last statement was: if you can, please help to keep this repo up-to-date and to improve it. @Logout22 do you think that this repo should be deprecated?
Actually I don't even understand the bug that is being discussed here. Are they trying to run a 32bit container inside a 64bit host, but it does not work as expected? What actually are the expectations for such a situation?
The reason I would like to deprecate this repo is not that missing feature in particular, but the fact that due to a missing Dockerfile in the setup we will not be able to specify the container's creation in detail. Apparently, someone else already did a better job at that; a similarly easy solution that seems to provide more flexibility and apparently is better aligned with Docker's general architecture.
Deprecating the repo is not the same as deleting it. We would only claim that our hands are tied and development and usage should continue elsewhere (and I think that seems to be the case, given the script's limitations, also the ones we discussed in my original pull request). The code would not be lost -- if your approach turns out to be more useful for some reason, we can easily remove the deprecation note and continue working here.
This project would be deprecated if the docker command "import" was deprecated. Otherwise it is just a different approach, neither better nor worse than the others.
I don't think that deprecating a project makes sense, people can choose to use it or not depending on their needs and situation.
The reason I would like to deprecate this repo is not that missing feature in particular, but the fact that due to a missing Dockerfile in the setup we will not be able to specify the container's creation in detail.
In my opinion, that is not a missing feature. Also, the lack of Dockerfile is not a problem, because we just build the image, we don't give the details of the container. The users can use this image within their own Dockerfile and specify the container details for themselves.
Apparently, someone else already did a better job at that; a similarly easy solution that seems to provide more flexibility and apparently is better aligned with Docker's general architecture.
I don't agree that they are more flexible or better solutions. But if you wish you can add on README a list of 2-3 links to similar projects, so that the users are better informed about their choises.
By the way, did you stop using this project? Let me know if you don't want to maintain it anymore, so that I can look for other maintainers.
Honestly, I stopped using Docker altogether due to a lot of bugs and limitations that bothered me, so if you like you can revoke my admin rights again. Thanks!
Activity
dashohoxha commentedon Oct 15, 2015
Docker itself officially supports only the 64bit arch.
I don't know how the
unamecommand works, and why it should give the wrong answer. Maybe you are trying it on a 64bit machine and it is just telling the truth.daald commentedon Oct 15, 2015
Read again my post. Build scripts are using calls like
dpkg-architecture -qDEB_HOST_ARCHwhich indirectly calluname -m. Compiling in this 32bit container will make debian buildfiles trying to build a 64bit executable which will fail because libraries and compiler don't match this target. the linux32 command changes how the kernel reports the architecture to the called process and all its children. I can simply demonstrate this without docker:me$ linux32 uname -m
i686
me$ linux64 uname -m
x86_64
Prefixing each command line with
linux32should be enough to fix this. I just don't know how to useENTRYPOINTcorrectlydashohoxha commentedon Oct 16, 2015
This is not a Docker problem and neither a 32bit/ubuntu problem.
Trying to use ENTRYPOINT for solving it is simply stupid; read the Docker docs first.
Just make an alias like this:
alias uname='linux32 uname'before starting the compilation.And if it doesn't work try to find some other solution.
daald commentedon Oct 16, 2015
alias doesn't work in scripts and Dockerfiles, but
ENTRYPOINT ["/usr/bin/linux32", "--"]solved my problem. The Docker docs are huge. I didn't find a place which says that using ENTRYPOINT is stupidremram44 commentedon May 25, 2016
Thanks for the workaround @daald! This is what I was missing!
jcoffland commentedon May 29, 2016
To fix this problem for all invocations of
/bin/sh, including docker image build commands, add these commands near the top of yourDockerfile:This replaces
/bin/shwith a script which transparently runs the original/bin/shunder/usr/bin/linux32. You can do the same for/bin/bashif you like.jcoffland commentedon May 29, 2016
Alternatively you can just replace
/bin/unamelike this:remram44 commentedon May 29, 2016
@jcoffland You understand that uname is a system call right? This will NOT help.
jcoffland commentedon May 29, 2016
@remram44 you should try it before commenting.
uname()is a system call but/bin/unameis an executable program.remram44 commentedon May 29, 2016
Your code will fix direct calls to the uname binary but anything using the system call directly will still be broken. You fix a very small part of the issue here.
Cf docker-32bit/ubuntu#12
Cf docker-32bit/ubuntu#12
Cf docker-32bit/ubuntu#12
Cf docker-32bit/ubuntu#12
7 remaining items
Cf docker-32bit/ubuntu#12
Cf docker-32bit/ubuntu#12
Cf docker-32bit/ubuntu#12
jcoffland commentedon May 29, 2016
@remram44 You're thinking about an idealized solution. I'm presenting a practical one. The title of this issue is uname -m shows wrong architecture. My solution solves that problem.
remram44 commentedon May 29, 2016
You should consider working for Volkswagen. "See? The tests pass now!" You could also replace uname by a script that always prints "i686" no matter the command-line?
What's the point of lying to the user while apt-get, compilers and everything else will still explode in his face?
ioft/u386-ubuntu has been fixed, so it's what I'll use. Unsubscribing from this version that does not seem supported anyway.
dashohoxha commentedon May 29, 2016
Yes guys, this is a simple solution, built for simple people, by a simple guy, who does not even need to use it anymore. Actually I don't understand anything at all from the discussion above. So, if you can find any better solution, please follow it.
Alternatively, you can try to improve this one (just for the sake of the namespace: docker-32bit). If you need access rights for this, please ask me.
remram44 commentedon May 29, 2016
The fix is
ENTRYPOINT ["linux32", "--"]. ioft maintains an image at https://github.com/ioft/dockerhub that has the fix and that he keeps up to date, so no action is necessary here 😄Logout22 commentedon May 29, 2016
@remram44 We cannot apply such a fix because the script does not create a Dockerfile, but rather uses Docker directly.
@dashohoxha Given your last statement, do you think it would make sense to deprecate the repo officially in the Readme and link to the alternative @remram44 mentioned?
dashohoxha commentedon May 29, 2016
My last statement was: if you can, please help to keep this repo up-to-date and to improve it.
@Logout22 do you think that this repo should be deprecated?
Actually I don't even understand the bug that is being discussed here. Are they trying to run a 32bit container inside a 64bit host, but it does not work as expected? What actually are the expectations for such a situation?
Logout22 commentedon Jun 1, 2016
Exactly. Compilation fails because uname reports architecture correctly according to the running kernel. Prefixing every command with linux32 is a hack that wraps the processes in the docker into another environment that pretends the computer is running on a 32-bit architecture (as described here for example: http://linux.die.net/man/8/linux32 ).
The reason I would like to deprecate this repo is not that missing feature in particular, but the fact that due to a missing Dockerfile in the setup we will not be able to specify the container's creation in detail. Apparently, someone else already did a better job at that; a similarly easy solution that seems to provide more flexibility and apparently is better aligned with Docker's general architecture.
Deprecating the repo is not the same as deleting it. We would only claim that our hands are tied and development and usage should continue elsewhere (and I think that seems to be the case, given the script's limitations, also the ones we discussed in my original pull request). The code would not be lost -- if your approach turns out to be more useful for some reason, we can easily remove the deprecation note and continue working here.
dashohoxha commentedon Jun 1, 2016
This project would be deprecated if the docker command "import" was deprecated. Otherwise it is just a different approach, neither better nor worse than the others.
I don't think that deprecating a project makes sense, people can choose to use it or not depending on their needs and situation.
dashohoxha commentedon Jun 3, 2016
In my opinion, that is not a missing feature. Also, the lack of Dockerfile is not a problem, because we just build the image, we don't give the details of the container. The users can use this image within their own Dockerfile and specify the container details for themselves.
I don't agree that they are more flexible or better solutions. But if you wish you can add on README a list of 2-3 links to similar projects, so that the users are better informed about their choises.
By the way, did you stop using this project? Let me know if you don't want to maintain it anymore, so that I can look for other maintainers.
Logout22 commentedon Jun 4, 2016
Honestly, I stopped using Docker altogether due to a lot of bugs and limitations that bothered me, so if you like you can revoke my admin rights again. Thanks!
dashohoxha commentedon Jun 5, 2016
Thanks for letting me know.
ericcurtin commentedon Nov 8, 2018
I normally put something like this in my x86 32 bit dockers:
Hacky, but it's hard to avoid