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.
- What you will need:
- An hour of time.
- A ChromeOS Device with Android Apps support. (Again, Developer Mode is NOT needed)
- The Termux App Play Store Link
- The Termux X/GUI Repos
- The latest Alpine Virutal ISO (x86_64) (NOTE: I could not get the standard Alpine ISO to work, so far I've only managed to get the Virtual version to work)
- Install Termux.
- Setup Termux packages:
NOTE: It is important to install wget or https will fail due to an older verison that comes with Termux.
pkg update pkg upgrade pkg install coreutils pkg install termux-tools proot util-linux net-tools openssh git pkg install wget
- Setup storage:
For more information about directories in Termux see this stack overflow post.
termux-setup-storage
- Add the X/GUI Repos:
wget https://raw.githubusercontent.com/xeffyr/termux-x-repository/master/enablerepo.sh bash enablerepo.sh
- Install QEMU
pkg install qemu-system
- Clone this repo:
git clone https://github.com/pwdonald/chromeos-qemu-docker.git
- Create Virtual Storage Device:
(NOTE: make sure you're aware of what directory you're in i.e. /storage/emulated/0/Download can be wiped by ChromeOS periodically as space is needed so backup often!)
- This command will create a 4GB dynamically allocated (qcow2) virtual drive.
qemu-img create -f qcow2 virtual_drive 4G
- Download the latest version of the virtual ISO from the Alpine Linux website.
- Rename the iso to alpine_x86_64.iso
- Run the command
bash ./chromeos-qemu-docker/scripts/setup_alpine.sh
- This script should be run in whichever directory your virtual drive exists to start the VM.
- This may take a few minutes to start, resulting in a black screen with a cursor.
- If you've been using the Termux session for a while you may see some of your history creep into view instead of a black screen.
- Once inside the VM:
- Login with username root.
- Run the following command:
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:
setup-alpine
Then attempt to run theecho "nameserver 8.8.8.8" > /etc/resolv.conf
alpine-setup
command again.
- Once the
alpine-setup
script is complete--it will instruct you to restart the machine.- To exit the VM Press Ctrl + A, X.
- Congrats! You've installed Alpine Linux!
- Run the command:
bash ./chromeos-qemu-docker/scripts/start_persist.sh
- Login with root & the password you setup in step 8.
- You may have to add your nameservers again.
- Run:
Or install your favorite editor of choice
apk --no-cache update apk --no-cache install vim
- Use vim (or whiehver editor) to modify
/etc/apk/repositories
by uncommenting the line ending withcommunity
. To uncomment simply delete the leading#
symbol on the line. - Run
Docker is now installed!
apk --no-cache add docker
- Login with root & the password you setup in step 8.
- Start the docker service with
service docker start
- You can now use docker as you would in a traditional environment.
- The
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.
- Samsung Chromebook Pro
- Asus C302