Dockerfile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. FROM archlinux/archlinux:base-devel as builder
  2. RUN pacman -Syy
  3. RUN pacman -Syu --needed --noconfirm git xdg-user-dirs
  4. # makepkg user and workdir
  5. ARG user=makepkg
  6. ENV PATH="/home/makepkg/.pub-cache/bin:/home/makepkg/.local/flutter/bin:/home/makepkg/.local/flutter/bin/cache/dart-sdk/bin:${PATH}"
  7. RUN useradd --system --create-home $user \
  8. && echo "$user ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$user
  9. USER $user
  10. WORKDIR /home/$user
  11. # Install yay
  12. RUN git clone https://aur.archlinux.org/yay.git \
  13. && cd yay \
  14. && makepkg -sri --needed --noconfirm \
  15. && cd \
  16. && rm -rf .cache yay
  17. RUN yay -S --noconfirm curl base-devel sqlite openssl clang cmake ninja pkg-config gtk3 unzip
  18. RUN xdg-user-dirs-update
  19. RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
  20. RUN source $HOME/.cargo/env && rustup toolchain install stable && rustup default stable
  21. RUN git clone https://github.com/flutter/flutter.git $HOME/.local/flutter
  22. RUN flutter channel stable
  23. RUN flutter config --enable-linux-desktop
  24. RUN flutter doctor
  25. RUN dart pub global activate protoc_plugin
  26. RUN git clone https://github.com/AppFlowy-IO/appflowy.git && \
  27. cd appflowy/frontend && \
  28. source $HOME/.cargo/env && \
  29. cargo install --force cargo-make && \
  30. cargo install --force duckscript_cli && \
  31. cargo make flowy_dev && \
  32. cargo make -p production-linux-x86 appflowy-linux
  33. CMD ["/home/makepkg/appflowy/frontend/app_flowy/build/linux/x64/release/bundle/app_flowy"]
  34. #################
  35. FROM archlinux/archlinux:base-devel
  36. RUN pacman -Syy
  37. RUN pacman -Syu --needed --noconfirm xdg-user-dirs
  38. RUN xdg-user-dirs-update
  39. ARG user=makepkg
  40. RUN useradd --system --create-home $user \
  41. && echo "$user ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$user
  42. USER $user
  43. WORKDIR /home/$user
  44. COPY --from=builder /usr/sbin/yay /usr/sbin/yay
  45. RUN yay -S --noconfirm gtk3
  46. COPY --from=builder /home/makepkg/appflowy/frontend/app_flowy/build/linux/x64/release/bundle ./AppFlowy
  47. CMD ["/home/makepkg/AppFlowy/app_flowy"]