1
0
mirror of https://github.com/moparisthebest/arch-ppa synced 2024-12-12 01:42:16 -05:00
arch-ppa/Dockerfile

24 lines
1.1 KiB
Docker
Raw Normal View History

2019-08-18 21:26:07 -04:00
FROM archlinux/base:latest AS build
ARG PKGS_TO_BUILD_IN_ORDER
ENV PKGS_TO_BUILD_IN_ORDER=$PKGS_TO_BUILD_IN_ORDER
# Install tools required for project
# Run `docker build --no-cache .` to update dependencies
RUN mkdir -p /build/ /repo/ /var/cache/pacman/pkg/ && chown nobody: /build/ /repo/ && \
echo -e '[aur]\nSigLevel = Never\nServer = file:///repo' >> /etc/pacman.conf && repo-add /repo/aur.db.tar.gz && \
echo 'COMPRESSXZ=(xz -c -z - --threads=0)' >> /etc/makepkg.conf && \
2019-08-31 22:41:40 -04:00
pacman -Syu --noconfirm base sudo base-devel && \
2019-08-18 21:26:07 -04:00
echo -e 'nobody ALL= NOPASSWD: /usr/bin/pacman\nnobody ALL= NOPASSWD: /usr/bin/makepkg' > /etc/sudoers.d/nobody
COPY . /build/
WORKDIR /build/src/
RUN chown -R nobody: /build/ /repo/ && /build/.docker/build.sh /build/src /repo
# This results in a single layer image
FROM nginx:stable-alpine
COPY --from=build /repo/ /usr/share/nginx/html
RUN rm /usr/share/nginx/html/index.html /usr/share/nginx/html/50x.html && chown -R nginx: /usr/share/nginx/html && \
sed -i 's@root /usr/share/nginx/html;@root /usr/share/nginx/html; autoindex on;@' /etc/nginx/conf.d/default.conf