From 631093b58f236eec7fdcc377e75c2576ab3d0c08 Mon Sep 17 00:00:00 2001 From: KoNicks Date: Sun, 16 May 2021 01:11:50 +0300 Subject: [PATCH] added docker --- Dockerfile | 11 +++++++++++ README.md | 11 ++++++++--- koffe | 7 +++++++ 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f2d4a2e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM archlinux +RUN install -d /usr/bin/ +RUN install -d /usr/share/koffe +COPY koffe /usr/bin/koffe +COPY pi.is /usr/share/koffe/pi.is +COPY install /usr/share/koffe/install +RUN chmod +x /usr/bin/koffe +RUN pacman -Sy base archiso pacman-contrib libnewt wget git --noconfirm +RUN install -d /etc/koffe-docker/finalimage/ +CMD ["cd", "/etc/koffe-docker/finalimage"] +ENTRYPOINT ["/usr/bin/koffe"] diff --git a/README.md b/README.md index 7170ea3..53f39da 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,13 @@ # koffe -# If you're using another distrbution/MacOS create a chroot system (using the bootstrap image on the arch page), configure the repos, then simply install koffe from the aur either manually or with an aur helper. If you're on windows see if you can find arch in WSL or switch to a better OS. -## Converting a standard Arch USB to koffe without any other OS (internet required): +# If you're using another distrbution create a chroot system (using the bootstrap image on the arch page), configure the repos, then simply install koffe from the aur either manually or with an aur helper. If you're on windows see if you can find arch in WSL or switch to a better OS. +# New: you can now also use koffe through docker for easy peasy use on Windows and macOS, just run the following Commands: +`git clone https://github.com/konickss/koffe` +`cd koffe` +`sudo docker build -t koffe .` +`sudo docker run -v ADRESS_ON_HOST:/etc/koffe-docker/finalimage --rm koffe /usr/bin/koffe --pacs=base,linux` +## Note: replace ADRESS_ON_HOST with a absolute path on your host, something like `c:\Foo\bar\` on windows or `/foo/bar` on lnx/macOS/bsd +# Converting a standard Arch USB to koffe without any other OS (internet required): In the grub boot menu, press tab on the menu entry you want to boot and add `copytoram` at the end of the kernel parameters, boot from that. Next, clone the koffe repo from the aur and install it (`git clone https://aur.archlinux.org/koffe ; chown -hR nobody koffe ; cd koffe ; sudo -u nobody makepkg -si`). Generate your iso using koffe (documentation @ koffe --help), then lsblk and identify your arch USB, wipe the file system `wipefs --all /dev/sdX` (make sure you're wiping the entire drive, not just a partition) then burn the koffe iso (`cat /root/*.iso > /dev/sdX`) once again, make sure you're doing it to the whole drive, not just a partition. # Introduction @@ -22,7 +28,6 @@ koffe --scripts=/path/path/ --> copies the scripts in the specified path and uses them instead of the default koffe scripts in /usr/share/koffe/. Avoid paths with spaces -The output iso will most likely be in /root/ and will require root permission to extract, this is to prevent non-admins making isos willy nilly and potentially ruining a system. # Installation Installation is pretty easy, just boot from the iso and type `bash install`, the installer will do everything for you. diff --git a/koffe b/koffe index 9777171..949876b 100755 --- a/koffe +++ b/koffe @@ -173,6 +173,13 @@ then cp /tmp/koffe/aurbg/$depend/*.pkg.tar.zst /usr/share/archiso/configs/releng/airootfs/root/pkg fi done + declare -a bbm + bbm=$(cat /tmp/koffe/aurbg/$app/.SRCINFO | grep makedepends | cut -f 2 -d '=' | cut -f 1 -d '>' | cut -f 1 -d ':') + for depend in $bbm + do + pacman -S $depend --noconfirm + done + fi done repo-add /usr/share/archiso/configs/releng/airootfs/root/pkg/koffe.db.tar.gz /usr/share/archiso/configs/releng/airootfs/root/pkg/*