21

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?

Hussain
  • 5,057
  • 6
  • 45
  • 71

6 Answers6

44

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.


MS Berends
  • 4,489
  • 1
  • 40
  • 53
  • 3
    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 supported – marsbard Aug 08 '18 at 19:04
  • 2
    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. – MS Berends Aug 17 '18 at 08:09
  • 1
    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. – marsbard Aug 20 '18 at 06:27
  • 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 for – marsbard Aug 26 '18 at 00:46
  • 3
    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. – Chuck Claunch Jun 22 '19 at 21:16
  • 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) – smat88dd Nov 27 '19 at 05:11
  • 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! – John Smith Dec 28 '20 at 04:56
  • 3
    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. – John Smith Dec 29 '20 at 13:16
  • 2
    Confirm that "sudo apt install -y docker.io" is ok but install 18.09.1 version, not the latest – Migio B May 06 '21 at 15:19
  • 1
    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) – Rolands.EU Apr 05 '22 at 17:24
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

rbaleksandar
  • 8,713
  • 7
  • 76
  • 161
GHETTO.CHiLD
  • 3,267
  • 1
  • 22
  • 34
  • There is one of the first docker issues about that: https://github.com/docker/docker/issues/136 – michael_bitard Jun 23 '16 at 13:09
  • 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. – GHETTO.CHiLD Jun 23 '16 at 19:03
  • 3
    How do I do that? AFAIK It's hardware dependent – Hussain Jun 25 '16 at 13:18
  • 3
    This should not be the accepted answer anymore, since it is possible - see MS Berends answer. – smat88dd Nov 27 '19 at 04:57
  • 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. – GHETTO.CHiLD Nov 27 '19 at 20:52
  • 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. – MS Berends Jan 04 '20 at 18:39
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

southz rgw
  • 353
  • 4
  • 13
  • 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. – Mark Aug 23 '18 at 17:48
  • 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. – southz rgw Aug 31 '18 at 08:57
  • 2
    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. – Mark Sep 01 '18 at 11:05
  • There is a buildoption to build without docker. I got warnings to turn that option on, but the build succeeded anyway – southz rgw Sep 03 '18 at 16:47
  • Which buildoption did you use @southzrgw to skip docker prerequisite? – vulcan raven Jul 17 '19 at 10:27
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.

user2915097
  • 30,758
  • 6
  • 57
  • 59
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.

Nevzat Günay
  • 1,039
  • 11
  • 19
0

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

Meraj Kazi
  • 65
  • 10