![]() #!/data/data/com.termux/files/usr/bin/bashĮxport PATH="$" \ $ export DISABLE_WARN_OUTSIDE_CONTAINER=1 To build and install it: $ cd $TMPDIR/docker-build This package will compile a binary named docker and all docker man pages. This is the docker client, which will talk to the docker daemon. All commands for the differents packages that'll be compiled next is meant to be executed inside this folder. Create a work directory where the packages will be downloaded and built: $ mkdir $TMPDIR/docker-buildĭownload all the patches files into there and let's begin. Now we're ready to start compiling things. So hands on.įirts, let's install the packages we're gonna use to build docker in Termux: $ pkg install go make cmake ndk-multilib tsu It's a suite because it's not just one program, but rather a set of different programs that we'll need to compile separately. Once you have a supported kernel, it's time to compile the docker suite. If you applied the Makefile patch, you'll see this warning everytime your phone boots:ĭon't worry though, this is a harmless warning remembering you that you're using a modified kernel. Now that everything is setup, compile and flash the kernel. If you work at Google or know someone who does, warn him/her about it.Ĭheck the patch at the attachments section and modify your xt_qtaguid.c accordingly. After you run any container, a seg fault will be generated due to a null pointer dereference and your phone will freeze and reboot. This second file needs to be patched because of a bug introduced by Google. If you do not apply this patch, the output of the check-config.sh script used above won't be reliable after recompiling the kernel.Ĭheck the patch at the attachments section and modify your Makefile accordingly. Although not strictly necessary to modify this file, it will help by making it possible to check if your kernel has all the necessary features docker needs. Patchingīefore compiling the kernel there are two files that need to be patched. For the Storage Drivers we'll be using the overlay. This will show the description and location of the item.įor now, we want to enable the Generally Necessary items, the Network Drivers items and some Optional Features. To look for some item in particular, you can press the / key and type the item name and hit Enter. ![]() This menu is a modified version of dialog, a ncurses window menu, in which you can enable and disable the kernel features. Now, in your computer, open the kernel's configuration menu. $ sed -i '1s_.*_#!/data/data/com.termux/files/usr/bin/bash_' check-config.sh Next, open Termux and download a script to check your kernel: $ pkg install wget It has a package manager with many tools compiled for Android. This is the terminal emulator that we're going to use throughout this guide. To check the necessary features list, first install the Termux app in your phone. Docker needs a lot of features that are disabled by default in Android's kernel. Now that you (hopefully) are able to compile the kernel, let's talk about what matters. None of these operations erase any data in your phone. In this case, you can flash a kernel that's known to be working or just flash a working ROM, since it contains a kernel with it. The worst that can happen is you get stuck in a boot loop. Note that flashing the kernel won't erase any data in your phone. ![]() If everything went well, then you can proceed to the modifications. ![]() Start by compiling the kernel without any modification. General compiling instructionsĬompiling the phone's kernel is also device specific, but some major tips may help you out.įirst, google about instructions for your phone. Just be aware that you may lose your phone's warrant and all your data will be erased after unlocking the bootloader, so make a backup of your important stuff. You'll need to google for instructions for your device and follow them. This step is pretty device specific, so there's no way to write a generic tutorial here. Yes, it is possible.īear in mind that you'll have to root your phone, mess with and compile your phone's kernel and docker suite. By directly I mean there's no VM involved nor chrooting inside a GNU/Linux rootfs. This tutorial presents a step by step guide on how to run docker containers directly on Android. This will install the whole docker suite, left only Tini to be compiled manually. To install them, simply pkg install root-repo & pkg install docker. All packages, except for Tini have been added to termux-root.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |