How to install Docker on 32bit machine having Ubuntu 12.04?
Asked Answered
M

6

22

I have followed the docker installation doc for installing it on my machine which is a 32 bit machine running Ubuntu 12.04

The step

$ sudo apt-get install docker-engine

fails saying

E: Unable to locate package docker-engine

It should have been installed, right?

Also I came to know that, Docker currently only supports 64bit platforms.

$ wget -qO- https://get.docker.io/ | sh
Error: you are not using a 64bit platform.
Docker currently only supports 64bit platforms.

Is there a way to I install it and make it work on 32bit machine?

Marcelinomarcell answered 23/6, 2016 at 10:52 Comment(0)
U
13

As per the prerequisites:

Docker requires a 64-bit installation regardless of your Ubuntu version. Additionally, your kernel must be 3.10 at minimum. The latest 3.10 minor version or a newer maintained version are also acceptable.

You will not be able to install Docker onto a 32bit platform.

UPDATE:

It is possible. See answer from MS Berends in this same thread

Udometer answered 23/6, 2016 at 12:15 Comment(6)
There is one of the first docker issues about that: github.com/docker/docker/issues/136Bibliotaph
sure, but isn't it easier to upgrade to a x64 os, especially if you are on linux? that is way easier than trying to force 64-bit software to work on a 32-bit platform.Udometer
How do I do that? AFAIK It's hardware dependentMarcelinomarcell
This should not be the accepted answer anymore, since it is possible - see MS Berends answer.Antrum
Docker does not provide official 32 but support, also running a 32 but app in a 64 bit container was not the question. As of 17.04 Docker will not compile on modern os’ as they move to drop 32 but support. Are there hacks? Sure. But doesn’t expect it to run like it does in its native architecture. This answer still holds true.Udometer
No, it doesn’t hold true. The question is ‘how to install’, not ‘is it officially supported’. Moreover, you state ‘You will not be able to install Docker onto a 32bit platform‘. That’s now proven to be incorrect :) I don’t need the points for having the accepted answer, but just wanted to reply since I think your counter argument is off.Plea
P
46

This is possible these days, with just a simple script. You could use https://gitlab.com/docker-32bit/ubuntu.

Works perfectly on my Ubuntu 16.04 32-bit system. I used it to install the office server Collabora Online for my Nextcloud:

wget https://gitlab.com/docker-32bit/ubuntu/raw/master/build-image.sh
# for Debian, use one of:
# wget https://gitlab.com/docker-32bit/debian/raw/armhf/build-image.sh
# wget https://gitlab.com/docker-32bit/debian/raw/i386/build-image.sh

sudo bash build-image.sh
docker -v
# Docker version 1.13.1, build 092cba3
    
sudo docker pull collabora/code
sudo docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=my\\.domain\\.com' --restart always --cap-add MKNOD collabora/code

Update December 2020

It seems that sudo apt install -y docker.io might just work on Debian 10 Buster and would install a 32-bit compatible Docker version. Didn't test it myself, but John Smith confirmed this.


Plea answered 20/2, 2018 at 8:45 Comment(10)
This is a script to build a docker image of a 32 bit ubuntu, rather than building docker to run on a 32 bit system. The OP (and I) would like to know how to install docker itself on a 32 bit ubuntu (or other) system but it seems like it is not supportedHolms
This DOES install and runs on a 32-bit system, like I stated in my answer. I use it to have docker on my 32-bit Ubuntu.Plea
My mistake, not sure what I was looking at when I wrote that. Sorry about that, and sorry for the downvote which I can't remove now unless the answer is edited.Holms
and now I upvoted :-) not sure if I will use it though since my 32 bit machines are soooo sloooow for what I want to use docker forHolms
Wish I could upvote this 100 times! Worked great for me running Ubuntu 18.04 32-bit on an old thin client running an Intel Atom. Was able to easily get the hass.io docker going on it.Sore
The script actually fails for me on Debian 10/Buster since dchroot cannot be installed; it was replaced with schroot so the script needs to be updated (did that locally testing it now)Antrum
Yeah, for Buster you ned to replace dchroot with schroot (I also changed 'jessie' to buster'.) I also needed to add /usr/sbin to my $PATH but other than that it works. However, it appears, and I'm not certain, that an apt call near the beginning of the script is what installs docker, and then the script spends a whooooole lot of time compiling a massive new Debian image after that which isn't strictly necessary if all you need is docker installed. I'm definitely not positive though, I'm brand new to this. At any rate, yes, it does install Docker, even on Buster with some tweaks, so thanks!Humming
Confirmed on a fresh Debian 10 Buster install. You don't need to run this whole script. sudo apt install -y docker.io installs a 32-bit compatible docker.Humming
Confirm that "sudo apt install -y docker.io" is ok but install 18.09.1 version, not the latestRheta
Confirm that sudo apt install -y docker.io will work on Ubuntu 32 bit 16.04 :) (Docker version as of time of posting: 18.09.7, build 2d0083d)Sorcerer
U
13

As per the prerequisites:

Docker requires a 64-bit installation regardless of your Ubuntu version. Additionally, your kernel must be 3.10 at minimum. The latest 3.10 minor version or a newer maintained version are also acceptable.

You will not be able to install Docker onto a 32bit platform.

UPDATE:

It is possible. See answer from MS Berends in this same thread

Udometer answered 23/6, 2016 at 12:15 Comment(6)
There is one of the first docker issues about that: github.com/docker/docker/issues/136Bibliotaph
sure, but isn't it easier to upgrade to a x64 os, especially if you are on linux? that is way easier than trying to force 64-bit software to work on a 32-bit platform.Udometer
How do I do that? AFAIK It's hardware dependentMarcelinomarcell
This should not be the accepted answer anymore, since it is possible - see MS Berends answer.Antrum
Docker does not provide official 32 but support, also running a 32 but app in a 64 bit container was not the question. As of 17.04 Docker will not compile on modern os’ as they move to drop 32 but support. Are there hacks? Sure. But doesn’t expect it to run like it does in its native architecture. This answer still holds true.Udometer
No, it doesn’t hold true. The question is ‘how to install’, not ‘is it officially supported’. Moreover, you state ‘You will not be able to install Docker onto a 32bit platform‘. That’s now proven to be incorrect :) I don’t need the points for having the accepted answer, but just wanted to reply since I think your counter argument is off.Plea
T
4

Although this is an old queston i found a simple solution for current (18.0.3) releases of docker-ce: https://github.com/mforkel/docker-ce-i386

The description of README-i386.md is all you need, but here the shot description:

1) use git clone to get a local version of the repository

2) in my case i needed a debian .deb file so i ran ARCH=i386 DOCKER_BUILD_PKGS=debian-stretch make deb in the main Folder

3) when the makescript finished you can find your deb file in ./components/packaging/deb/debbuild/debian-stretch

I did not test this build extensively, but running docker run hello-world worked without errors

EDIT: By now i can confirm many packages working. E.g. Portainer and Nextcloud. Some packages are build agains 64bit architecture and you have to build the container on your own, but it worked for me without any problems

Tee answered 20/8, 2018 at 18:6 Comment(5)
This works, however it requires that some (probably older) version of docker is installed. On ubuntu, this requires first running sudo apt install docker.io, and after the docker-ce package is built, you must sudo apt remove docker.io before installing the built deb package that was built.Storiette
Why should you need an older version of docker? I uninstalled all docker packages before compiling the code an it compiled without a docker environment.Tee
if you look at the Makefiles, they use docker build in order to build docker, so unless you already had some kind of docker installed, the build would have failed.Storiette
There is a buildoption to build without docker. I got warnings to turn that option on, but the build succeeded anywayTee
Which buildoption did you use @southzrgw to skip docker prerequisite?Milkweed
U
3

there has been some hacking, unsupported ways to do so, see

http://mwhiteley.com/linux-containers/2013/08/31/docker-on-i386.html

Keep in mind that the previous link was in August 2013, I am not sure you will be able to do the same with the latest versions of docker.

Upsweep answered 23/6, 2016 at 14:0 Comment(0)
N
1

Using Ubuntu 16.04 on my old Toshiba Dual Core laptop with 2 gb ram.

Confirming sudo apt install docker.io works perfectly in this old machine. It installs docker 18.09.7

Trying to create a home vps server. Finger crossed 🤞

Narcosis answered 5/8, 2022 at 15:14 Comment(0)
G
0

Now, you can install with this command sudo apt install docker.io. After this, you will see lots of lines for the installation of Docker and the installer will ask you "do you want to continue?", you need to type y. Then, the installation will be finished. Now, you can check it with this command docker version. If you see just client section, you need to type sudo docker version. After this, you will see the client and server.

Gogol answered 7/11, 2019 at 10:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.