2023-10-23 09:49:14 +00:00
|
|
|
# Stage 0
|
|
|
|
FROM archlinux:base-devel
|
|
|
|
RUN pacman-key --init
|
2023-10-23 10:19:24 +00:00
|
|
|
RUN pacman -Suy --noconfirm git
|
2023-10-23 09:49:14 +00:00
|
|
|
|
|
|
|
RUN useradd --no-create-home --shell=/bin/false build && usermod -L build && echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
|
|
|
RUN git clone https://aur.archlinux.org/stable-diffusion-ui.git /sdu
|
|
|
|
|
|
|
|
WORKDIR /sdu
|
|
|
|
RUN chown -R build:build /sdu
|
2023-10-24 18:53:02 +00:00
|
|
|
RUN sudo -u build makepkg -s --noconfirm
|
2023-10-23 09:49:14 +00:00
|
|
|
RUN mv -v stable-diffusion-ui*.pkg.tar.zst /stable-diffusion-ui.pkg.tar.zst
|
|
|
|
|
|
|
|
# Stage 1
|
2023-10-23 01:42:57 +00:00
|
|
|
FROM archlinux:latest
|
2023-10-23 09:49:14 +00:00
|
|
|
COPY --from=0 /stable-diffusion-ui.pkg.tar.zst /stable-diffusion-ui.pkg.tar.zst
|
|
|
|
|
2023-10-23 01:42:57 +00:00
|
|
|
RUN pacman-key --init
|
2023-10-24 18:53:02 +00:00
|
|
|
RUN pacman -Suy --noconfirm which
|
2023-10-23 01:42:57 +00:00
|
|
|
|
|
|
|
COPY init /init
|
|
|
|
COPY config.yaml /config.yaml
|
|
|
|
|
2023-10-24 18:53:02 +00:00
|
|
|
CMD /init
|