Merge pull request #346 from PabloCastellano/docker-fix

Fix docker build
This commit is contained in:
Nathan.fooo 2022-02-21 10:22:11 +08:00 committed by GitHub
commit 7eada39a8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 7 deletions

View File

@ -6,7 +6,7 @@ RUN pacman -Syu --needed --noconfirm git xdg-user-dirs
# makepkg user and workdir # makepkg user and workdir
ARG user=makepkg 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 \ RUN useradd --system --create-home $user \
&& echo "$user ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$user && echo "$user ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$user
USER $user USER $user
@ -27,6 +27,7 @@ RUN git clone https://github.com/flutter/flutter.git $HOME/.local/flutter
RUN flutter channel stable RUN flutter channel stable
RUN flutter config --enable-linux-desktop RUN flutter config --enable-linux-desktop
RUN flutter doctor RUN flutter doctor
RUN dart pub global activate protoc_plugin
RUN git clone https://github.com/AppFlowy-IO/appflowy.git && \ RUN git clone https://github.com/AppFlowy-IO/appflowy.git && \
cd appflowy/frontend && \ cd appflowy/frontend && \

View File

@ -9,4 +9,11 @@ services:
- DISPLAY=${DISPLAY} - DISPLAY=${DISPLAY}
volumes: volumes:
- $HOME/.Xauthority:/root/.Xauthority:rw - $HOME/.Xauthority:/root/.Xauthority:rw
- /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 network_mode: host
volumes:
appflowy-data: