#!/bin/sh alpine_version=3.12 mkdir -p "$alpine_version" docker run --rm -i -v "$PWD/$alpine_version:/package" alpine:$alpine_version << 'EOF' cd apk add alpine-sdk mkdir -p .abuild echo 'PACKAGER="GNS3 Packer "' > .abuild/abuild.conf abuild-keygen -a -n -q git clone --depth 1 git://git.alpinelinux.org/aports cd aports/*/ostinato abuild -F -r cd find packages -name "*.apk" -type f -exec cp -p {} /package \; chown $(stat -c '%u:%g' /package) /package/* EOF