alpine-overlay/Dockerfile

36 lines
1.5 KiB
Docker
Raw Normal View History

FROM alpine:3.20
ARG ALPINE="v3.20"
2023-05-06 18:07:41 +00:00
ARG BUILDUSER=alpine
2022-10-05 16:57:46 +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-10-25 16:22:11 +00:00
#echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \
echo "@edge-community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
2022-10-05 16:57:46 +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 && \
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 && \
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
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
ENTRYPOINT ["abuilder"]