Dockerfile 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. FROM archlinux/archlinux:base-devel
  2. RUN pacman -Syu --needed --noconfirm git xdg-user-dirs
  3. # makepkg user and workdir
  4. ARG user=makepkg
  5. ENV PATH="/home/makepkg/.local/flutter/bin:/home/makepkg/.local/flutter/bin/cache/dart-sdk/bin:${PATH}"
  6. RUN useradd --system --create-home $user \
  7. && echo "$user ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$user
  8. USER $user
  9. WORKDIR /home/$user
  10. # Install yay
  11. RUN git clone https://aur.archlinux.org/yay.git \
  12. && cd yay \
  13. && makepkg -sri --needed --noconfirm \
  14. && cd \
  15. && rm -rf .cache yay
  16. RUN yay -S --noconfirm curl base-devel sqlite openssl clang cmake ninja pkg-config gtk3 unzip
  17. RUN xdg-user-dirs-update
  18. RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
  19. RUN source $HOME/.cargo/env && rustup toolchain install nightly && rustup default nightly
  20. RUN git clone https://github.com/flutter/flutter.git $HOME/.local/flutter
  21. RUN flutter channel stable
  22. RUN flutter config --enable-linux-desktop
  23. RUN flutter doctor
  24. RUN git clone https://github.com/AppFlowy-IO/appflowy.git && \
  25. cd appflowy/frontend && \
  26. source $HOME/.cargo/env && \
  27. cargo install --force cargo-make && \
  28. cargo install --force duckscript_cli && \
  29. cargo make flowy_dev && \
  30. cargo make -p production-linux-x86 appflowy-linux
  31. CMD ["appflowy/frontend/app_flowy/product/0.0.2/linux/Release/AppFlowy/app_flowy"]