From bde597a10b7a500f7d3ddf9e0d63b979672aaf3b Mon Sep 17 00:00:00 2001 From: Pablo Castellano Date: Thu, 17 Feb 2022 20:40:17 +0100 Subject: [PATCH 1/3] fix: docker build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ❌ The protoc-gen-dart was not installed correctly. ✅ You can fix that by adding "dart pub global activate protoc_plugin" to your shell's config file.(.bashrc, .bash, etc.) --- frontend/scripts/docker-buildfiles/Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/scripts/docker-buildfiles/Dockerfile b/frontend/scripts/docker-buildfiles/Dockerfile index 620fbb046d..cf05376a70 100644 --- a/frontend/scripts/docker-buildfiles/Dockerfile +++ b/frontend/scripts/docker-buildfiles/Dockerfile @@ -1,12 +1,12 @@ FROM archlinux/archlinux:base-devel -RUN pacman -Syy +RUN pacman -Syy RUN pacman -Syu --needed --noconfirm git xdg-user-dirs # makepkg user and workdir ARG user=makepkg -ENV PATH="/home/makepkg/.local/flutter/bin:/home/makepkg/.local/flutter/bin/cache/dart-sdk/bin:${PATH}" +ENV PATH="/home/makepkg/.pub-cache/bin:/home/makepkg/.local/flutter/bin:/home/makepkg/.local/flutter/bin/cache/dart-sdk/bin:${PATH}" RUN useradd --system --create-home $user \ && echo "$user ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$user USER $user @@ -17,7 +17,7 @@ RUN git clone https://aur.archlinux.org/yay.git \ && cd yay \ && makepkg -sri --needed --noconfirm \ && cd \ - && rm -rf .cache yay + && rm -rf .cache yay RUN yay -S --noconfirm curl base-devel sqlite openssl clang cmake ninja pkg-config gtk3 unzip RUN xdg-user-dirs-update @@ -25,8 +25,9 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y RUN source $HOME/.cargo/env && rustup toolchain install stable && rustup default stable RUN git clone https://github.com/flutter/flutter.git $HOME/.local/flutter RUN flutter channel stable -RUN flutter config --enable-linux-desktop -RUN flutter doctor +RUN flutter config --enable-linux-desktop +RUN flutter doctor +RUN dart pub global activate protoc_plugin RUN git clone https://github.com/AppFlowy-IO/appflowy.git && \ cd appflowy/frontend && \ From 7820c8e70db9bb834fe7cd1a6b69e2cc1e97ba16 Mon Sep 17 00:00:00 2001 From: Pablo Castellano Date: Thu, 17 Feb 2022 21:42:20 +0100 Subject: [PATCH 2/3] fix: also mount other required volumes in docker-compose --- frontend/scripts/docker-buildfiles/docker-compose.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/scripts/docker-buildfiles/docker-compose.yml b/frontend/scripts/docker-buildfiles/docker-compose.yml index 67fb26ab9f..14f4534d72 100644 --- a/frontend/scripts/docker-buildfiles/docker-compose.yml +++ b/frontend/scripts/docker-buildfiles/docker-compose.yml @@ -3,10 +3,13 @@ version: "3" services: app: build: . - stdin_open: true + stdin_open: true # tty: true environment: - DISPLAY=${DISPLAY} volumes: - $HOME/.Xauthority:/root/.Xauthority:rw - network_mode: host \ No newline at end of file + - /tmp/.X11-unix:/tmp/.X11-unix + - /dev/dri:/dev/dri + - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket + network_mode: host From 23795e1b6778740d381d52df9a7aabeecc211e46 Mon Sep 17 00:00:00 2001 From: Pablo Castellano Date: Sun, 20 Feb 2022 11:00:01 +0100 Subject: [PATCH 3/3] feat: add docker-compose data persistance --- frontend/scripts/docker-buildfiles/docker-compose.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/scripts/docker-buildfiles/docker-compose.yml b/frontend/scripts/docker-buildfiles/docker-compose.yml index 14f4534d72..d9f38082df 100644 --- a/frontend/scripts/docker-buildfiles/docker-compose.yml +++ b/frontend/scripts/docker-buildfiles/docker-compose.yml @@ -12,4 +12,8 @@ services: - /tmp/.X11-unix:/tmp/.X11-unix - /dev/dri:/dev/dri - /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket + - appflowy-data:/home/makepkg network_mode: host + +volumes: + appflowy-data: