Docker in 600 lines of bash using proot. Fully compatible with termux, runs on android up to version 10 with no problems.
This is a stateless script, it creates no files or anything to keep track of the instances you create. Doesn't run a daemon. It's plain bash, will ls
into a directory to see what instances you have. Simple as that.
Currently only alpine. Will add arch, fedora, ubuntu, debian and ... later.
- Directly pull and run docker images.
- Support
chroot
. - Test more on PC / x86.
- Make proot accept custom port mapping.
- proot
- bash 4.0+
- tar (d'oh! does this even count?)
- grep
- sha256sum (or disable image verification)
- curl
Example | Command |
---|---|
Run the command whoami in the default container |
bag x whoami |
Run the command sleep 3 in the default container |
bag x sleep 3 |
Run the command whoami in the container called foo, if the container doesn't exist, create it with default image first |
bag r foo whoami |
Create an container called foo with image alpine, don't run anything | bag c foo alpine |
Create an container called foo with default image (alpine), don't run anything | bag c foo |
Remove the container foo | bag rm foo |
Remove the default container | bag rmd |
Create tar archive from the container foo | bag e foo |
Copy a file/dir into the continaer foo | bag cp /etc/host foo:/opt |
Copy a file/dir from the continaer foo | bag cp foo:/opt/config.cfg /tmp |
Copy a file/dir from the continaer foo to container bar | bag cp foo:/etc bar:/usr/ |
- exec
- import
- kill
- pull
- push
- rename