2024-03-12 15:18:42 +00:00
|
|
|
FROM alpine:3.19
|
|
|
|
ARG ALPINE="v3.19"
|
2023-05-06 18:07:41 +00:00
|
|
|
ARG BUILDUSER=alpine
|
2022-10-05 16:57:46 +00:00
|
|
|
|
2022-10-06 18:03:30 +00:00
|
|
|
RUN echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE}/main" > /etc/apk/repositories && \
|
|
|
|
echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE}/community" >> /etc/apk/repositories && \
|
|
|
|
echo "@edge-main http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \
|
2024-03-12 15:18:42 +00:00
|
|
|
echo "@edge-community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
|
2022-10-05 16:57:46 +00:00
|
|
|
|
2022-10-06 18:03:30 +00:00
|
|
|
RUN apk -U --no-cache upgrade && \
|
|
|
|
apk --no-cache add \
|
|
|
|
alpine-sdk \
|
|
|
|
lua-aports \
|
|
|
|
doas \
|
|
|
|
pigz \
|
|
|
|
xz
|
|
|
|
# gcc-gnat \
|
2022-10-05 16:57:46 +00:00
|
|
|
|
2023-05-06 18:07:41 +00:00
|
|
|
RUN adduser -D $BUILDUSER && \
|
|
|
|
addgroup $BUILDUSER abuild && \
|
2022-10-06 18:03:30 +00:00
|
|
|
echo "permit nopass :abuild" > /etc/doas.d/doas.conf && \
|
|
|
|
install -d -g abuild -m 775 /var/cache/distfiles && \
|
2023-05-06 18:07:41 +00:00
|
|
|
install -d -g abuild -m 775 /packages && \
|
2024-04-03 14:27:05 +00:00
|
|
|
echo -e "$BUILDUSER:1001:64535" > /etc/subuid && \
|
|
|
|
echo -e "$BUILDUSER:1001:64535" > /etc/subgid && \
|
2024-03-12 15:18:42 +00:00
|
|
|
echo "@kubezero https://cdn.zero-downtime.net/alpine/${ALPINE}/kubezero" >> /etc/apk/repositories && \
|
|
|
|
wget -q -O /etc/apk/keys/stefan@zero-downtime.net-61bb6bfb.rsa.pub https://cdn.zero-downtime.net/alpine/stefan@zero-downtime.net-61bb6bfb.rsa.pub
|
2022-10-05 16:57:46 +00:00
|
|
|
|
2022-10-06 18:03:30 +00:00
|
|
|
COPY abuilder aarch64-toolchain.sh /usr/bin/
|
2022-10-05 16:57:46 +00:00
|
|
|
|
2023-05-06 18:07:41 +00:00
|
|
|
WORKDIR /home/$BUILDUSER
|
|
|
|
USER $BUILDUSER
|
2022-10-06 18:03:30 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["abuilder"]
|