Why would you choose this method over crouton? Crouton requires enabling developer mode on your ChromeOS device which breaks the security model of ChromeOS. This is fine for most developers but you trade security for performance. My goal was instead to trade performance for security.
Warning: Tested on Samsung Chromebook Pro (Intel m3 x86_64 w/ ChromeOS 63, 64) other hardware results may vary. I would be interested to know about other ChromeOS devices, so please let me know your results via PR or email
ARM Processor based ChromeOS Devices will have to use the qemu-system-x86_64
command which requires modifiying the two scripts in the script directory of this repo.
pkg update
pkg upgrade
pkg install coreutils
pkg install termux-tools proot util-linux net-tools openssh git
pkg install wget
NOTE: It is important to install wget or https will fail due to an older verison that comes with Termux.
termux-setup-storage
For more information about directories in Termux see this stack overflow post.
wget https://raw.githubusercontent.com/xeffyr/termux-x-repository/master/enablerepo.sh
bash enablerepo.sh
pkg install qemu-system
git clone https://github.com/pwdonald/chromeos-qemu-docker.git
qemu-img create -f qcow2 virtual_drive 4G
bash ./chromeos-qemu-docker/scripts/setup_alpine.sh
setup-alpine
Answer the questions as you see fit. You may encounter errors when trying to setup the alpine package repos. If this happens you will need to exit the script (Ctrl + C) and run the following:
echo "nameserver 8.8.8.8" > /etc/resolv.conf
Then attempt to run the alpine-setup
command again.
alpine-setup
script is complete--it will instruct you to restart the machine.
bash ./chromeos-qemu-docker/scripts/start_persist.sh
apk --no-cache update
apk --no-cache install vim
Or install your favorite editor of choice
/etc/apk/repositories
by uncommenting the line ending with community
. To uncomment simply delete the leading #
symbol on the line. apk --no-cache add docker
Docker is now installed!
service docker start
start_persist.sh
script maps ports 22 and 80 from the virtual environment to 10020 and 10080 respectively on the Termux environment. You can utilize these ports from your ChromeOS env by finding the IP address of your Termux session.This is a list of devices with report(s) of successful installation.