| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 | FROM archlinux/archlinux:base-devel as builderRUN pacman -SyyRUN pacman -Syu --needed --noconfirm git xdg-user-dirs# makepkg user and workdirARG user=makepkgENV PATH="/home/$user/.pub-cache/bin:/home/$user/.local/flutter/bin:/home/$user/.local/flutter/bin/cache/dart-sdk/bin:${PATH}"RUN useradd --system --create-home $user \  && echo "$user ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$userUSER $userWORKDIR /home/$user# Install yayRUN git clone https://aur.archlinux.org/yay.git \  && cd yay \  && makepkg -sri --needed --noconfirmRUN yay -S --noconfirm curl base-devel sqlite openssl clang cmake ninja pkg-config gtk3 unzipRUN xdg-user-dirs-updateRUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -yRUN source $HOME/.cargo/env && rustup toolchain install stable && rustup default stableRUN git clone https://github.com/flutter/flutter.git $HOME/.local/flutterRUN flutter channel stableRUN flutter config --enable-linux-desktopRUN flutter doctorRUN dart pub global activate protoc_pluginRUN sudo pacman -Syu --needed --noconfirm git xdg-user-dirs libkeybinder3RUN git clone https://github.com/AppFlowy-IO/appflowy.git && \cd appflowy/frontend && \source $HOME/.cargo/env && \cargo install --force cargo-make && \cargo install --force duckscript_cli && \cargo make flowy_dev && \cargo make -p production-linux-x86_64 appflowy-linuxCMD ["/home/makepkg/appflowy/frontend/app_flowy/build/linux/x64/release/bundle/app_flowy"]#################FROM archlinux/archlinuxRUN pacman -Syy && \    pacman -Syu --needed --noconfirm xdg-user-dirs && \    pacman -Scc --noconfirmRUN xdg-user-dirs-updateCOPY --from=builder /usr/sbin/yay /usr/sbin/yayRUN yay -S --noconfirm gtk3ARG user=appflowyARG uid=1000ARG gid=1000RUN groupadd --gid $gid appflowyRUN useradd --create-home --uid $uid --gid $gid $userUSER $userWORKDIR /home/$userCOPY --from=builder /home/makepkg/appflowy/frontend/app_flowy/build/linux/x64/release/bundle/ .CMD ["./app_flowy"]
 |