From 6fad1a21cb4f0f05023a28cbfa8ad38b82db6a1b Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sun, 10 Aug 2025 11:56:56 -0400 Subject: aports: refactor and freya-base --- Dockerfile | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index 4893fd6..23eacb4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,48 @@ -FROM alpine +ARG UID="1000" +ARG GID="1000" +ARG ALPINE_VERSION="3.22" +FROM alpine:${ALPINE_VERSION} + +# set environment +ARG ALPINE_VERSION +ARG UID +ARG GID + +# add repos +RUN cat < /etc/apk/repositories +http://dl-cdn.alpinelinux.org/alpine/v${ALPINE_VERSION}/main +http://dl-cdn.alpinelinux.org/alpine/v${ALPINE_VERSION}/community +EOF + +# install packages RUN apk -U add alpine-sdk doas RUN echo "permit nopass :wheel" >> /etc/doas.d/doas.conf -RUN adduser -D user && adduser user abuild && adduser user wheel -USER user -CMD ["/bin/sh", "-c", "for port in /aports/*; do cd \"$port\" && abuild -r; done"] + +# create build user +RUN < /bin/aports-build +#!/bin/sh +for port in \$APORTS; do + cd "/aports/\$port" + abuild -r +done +CAT +chmod +x /bin/aports-build + +cat < /bin/aports-keygen +#!/bin/sh +echo \$PACKAGER_PRIVKEY | abuild-keygen +CAT +chmod +x /bin/aports-keygen +EOF + +# set user +USER builder -- cgit v1.2.3-freya