-
-
Save dirkakrid/1ff93796f05b8c124a56ac552e386609 to your computer and use it in GitHub Desktop.
Void Linux qutebrowser docker container hack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make: | |
# Creates a Void Linux docker container with qutebrowser. | |
# make run: | |
# Runs qutebrowser in aforementioned container | |
REPO = http://muslrepo.voidlinux.eu/ | |
XBPS_INSTALL = usr/bin/xbps-install | |
ROOTFS = rootfs | |
PACKAGES = base-system-busybox | |
PACKAGES += dbus | |
PACKAGES += ca-certificates | |
PACKAGES += qutebrowser | |
PACKAGES += terminus-font | |
PACKAGES += fonts-croscore-ttf | |
PACKAGES += dejavu-fonts-ttf | |
.PHONY: all gen clean run | |
all: gen | |
$(XBPS_INSTALL): | |
curl $(REPO)/static/xbps-static-latest.x86_64-musl.tar.xz | tar xJ | |
$(ROOTFS)/usr/bin/qutebrowser: $(XBPS_INSTALL) | |
yes Y | \ | |
XBPS_ARCH=x86_64-musl $(XBPS_INSTALL) \ | |
-y \ | |
-r $(ROOTFS) \ | |
--repository=$(REPO)/current \ | |
-S $(PACKAGES) | |
gen: $(ROOTFS)/usr/bin/qutebrowser | |
tar -pC $(ROOTFS) -c . | docker import - void-linux | |
clean: | |
rm -rf $(ROOTFS) | |
run: | |
./run.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
mkdir -p $HOME/.cache/qutebrowser \ | |
$HOME/.config/qutebrowser \ | |
$HOME/.local/share/qutebrowser | |
ssh -NnD127.0.0.1:20202 $SSH_HOST& | |
SSHPID=$! | |
xhost + | |
docker run \ | |
-it \ | |
--net=host \ | |
-e DISPLAY=$DISPLAY \ | |
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \ | |
-v $HOME/.cache/qutebrowser:/root/.cache/qutebrowser:rw \ | |
-v $HOME/.config/qutebrowser:/root/.config/qutebrowser:rw \ | |
-v $HOME/.local/share/qutebrowser:/root/.local/share/qutebrowser:rw \ | |
void-linux \ | |
sh -c 'mkdir -p /var/lib/dbus | |
dbus-uuidgen --ensure | |
/etc/sv/dbus/run& | |
qutebrowser \ | |
-s network proxy socks://127.0.0.1:20202 \ | |
-s ui default-zoom 100%' | |
xhost - | |
kill $SSHPID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment