| 
									
										
										
										
											2022-02-17 18:05:22 +01:00
										 |  |  | FROM archlinux/archlinux:base-devel as builder
 | 
					
						
							| 
									
										
										
										
											2021-12-23 14:30:03 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-17 20:40:17 +01:00
										 |  |  | RUN pacman -Syy
 | 
					
						
							| 
									
										
										
										
											2021-12-28 15:10:53 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-12-23 14:30:03 -05:00
										 |  |  | RUN pacman -Syu --needed --noconfirm git xdg-user-dirs
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # makepkg user and workdir
 | 
					
						
							|  |  |  | ARG user=makepkg | 
					
						
							| 
									
										
										
										
											2022-02-23 11:59:35 +01:00
										 |  |  | ENV PATH="/home/$user/.pub-cache/bin:/home/$user/.local/flutter/bin:/home/$user/.local/flutter/bin/cache/dart-sdk/bin:${PATH}"
 | 
					
						
							| 
									
										
										
										
											2021-12-23 14:30:03 -05:00
										 |  |  | RUN useradd --system --create-home $user \
 | 
					
						
							|  |  |  |   && echo "$user ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$user
 | 
					
						
							|  |  |  | USER $user
 | 
					
						
							|  |  |  | WORKDIR /home/$user
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Install yay
 | 
					
						
							|  |  |  | RUN git clone https://aur.archlinux.org/yay.git \
 | 
					
						
							|  |  |  |   && cd yay \
 | 
					
						
							| 
									
										
										
										
											2022-02-23 11:59:35 +01:00
										 |  |  |   && makepkg -sri --needed --noconfirm
 | 
					
						
							| 
									
										
										
										
											2021-12-23 14:30:03 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-11-07 15:27:31 +08:00
										 |  |  | RUN yay -S --noconfirm curl base-devel sqlite openssl clang cmake ninja pkg-config gtk3 unzip
 | 
					
						
							| 
									
										
										
										
											2021-12-23 14:30:03 -05:00
										 |  |  | RUN xdg-user-dirs-update
 | 
					
						
							|  |  |  | RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
 | 
					
						
							| 
									
										
										
										
											2022-01-23 11:34:41 +08:00
										 |  |  | RUN source $HOME/.cargo/env && rustup toolchain install stable && rustup default stable
 | 
					
						
							| 
									
										
										
										
											2021-12-23 14:30:03 -05:00
										 |  |  | RUN git clone https://github.com/flutter/flutter.git $HOME/.local/flutter
 | 
					
						
							|  |  |  | RUN flutter channel stable
 | 
					
						
							| 
									
										
										
										
											2022-02-17 20:40:17 +01:00
										 |  |  | RUN flutter config --enable-linux-desktop
 | 
					
						
							|  |  |  | RUN flutter doctor
 | 
					
						
							|  |  |  | RUN dart pub global activate protoc_plugin
 | 
					
						
							| 
									
										
										
										
											2022-08-31 23:00:58 +08:00
										 |  |  | RUN sudo pacman -Syu --needed --noconfirm git xdg-user-dirs libkeybinder3
 | 
					
						
							| 
									
										
										
										
											2021-12-23 14:30:03 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | RUN 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 && \
 | 
					
						
							| 
									
										
										
										
											2023-01-17 16:27:17 +08:00
										 |  |  | cargo make appflowy-flutter-deps-tools && \
 | 
					
						
							| 
									
										
										
										
											2022-07-31 19:43:52 +08:00
										 |  |  | cargo make -p production-linux-x86_64 appflowy-linux
 | 
					
						
							| 
									
										
										
										
											2022-02-17 18:05:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-26 16:27:17 +08:00
										 |  |  | CMD ["/home/makepkg/appflowy/frontend/appflowy_flutter/build/linux/x64/release/bundle/appflowy_flutter"]
 | 
					
						
							| 
									
										
										
										
											2022-02-17 18:05:22 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | #################
 | 
					
						
							| 
									
										
										
										
											2022-02-23 11:59:35 +01:00
										 |  |  | FROM archlinux/archlinux
 | 
					
						
							| 
									
										
										
										
											2022-02-17 18:05:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-23 11:59:35 +01:00
										 |  |  | RUN pacman -Syy && \
 | 
					
						
							|  |  |  |     pacman -Syu --needed --noconfirm xdg-user-dirs && \
 | 
					
						
							|  |  |  |     pacman -Scc --noconfirm
 | 
					
						
							| 
									
										
										
										
											2022-02-17 18:05:22 +01:00
										 |  |  | RUN xdg-user-dirs-update
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | COPY --from=builder /usr/sbin/yay /usr/sbin/yay
 | 
					
						
							| 
									
										
										
										
											2022-10-02 05:15:53 -07:00
										 |  |  | RUN yay -S --noconfirm gtk3 libkeybinder3
 | 
					
						
							| 
									
										
										
										
											2022-02-17 18:05:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-23 11:59:35 +01:00
										 |  |  | ARG user=appflowy | 
					
						
							|  |  |  | ARG uid=1000 | 
					
						
							|  |  |  | ARG gid=1000 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | RUN groupadd --gid $gid appflowy
 | 
					
						
							|  |  |  | RUN useradd --create-home --uid $uid --gid $gid $user
 | 
					
						
							|  |  |  | USER $user
 | 
					
						
							|  |  |  | WORKDIR /home/$user
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-26 16:27:17 +08:00
										 |  |  | COPY --from=builder /home/makepkg/appflowy/frontend/appflowy_flutter/build/linux/x64/release/bundle/ .
 | 
					
						
							| 
									
										
										
										
											2022-02-17 18:05:22 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-26 16:27:17 +08:00
										 |  |  | CMD ["./appflowy_flutter"]
 |