Skip to content

Instantly share code, notes, and snippets.

@ptrcnull
Created December 14, 2021 16:09
Show Gist options
  • Save ptrcnull/e8b464f7df964b484283f72f637043b1 to your computer and use it in GitHub Desktop.
Save ptrcnull/e8b464f7df964b484283f72f637043b1 to your computer and use it in GitHub Desktop.
#!/bin/sh
arch=x86
mirror=http://dl-cdn.alpinelinux.org/alpine/v3.15
wget $mirror/main/$arch/apk-tools-static-2.12.7-r3.apk
mv apk-tools-static-2.12.7-r3.apk apk.tar.gz
gunzip apk.tar.gz
tar xf apk.tar sbin
mv sbin/* /sbin
rm -rf sbin apk.tar
mkdir -p /lib/apk/db
mkdir /etc/apk
echo "$arch" > /etc/apk/arch
echo "$mirror/main
$mirror/community" > /etc/apk/repositories
touch /etc/apk/world
apk.static update --allow-untrusted
apk.static add --allow-untrusted alpine-keys
apk.static add alpine-base
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment