AppFlowy icon indicating copy to clipboard operation
AppFlowy copied to clipboard

[Bug] Make the docker image docker desktop compatible.

Open Supreme-Darkness opened this issue 1 year ago • 6 comments

Bug Description

When I use the docker desktop to pull the image and then run the container, the docker desktop is not able to find any main/latest release tag. It finds the 0.4.1 release. After pulling that image and starting docker container, it says that image doesn't expose any ports. Also, it fails to run the container and throws the following error "./AppFlowy: error while loading libraries: libnotify.so.4: cannot open shared object file:no such file or directory"

I don't know how to use the command line docker, so docker desktop is much easier for me to use.

How to Reproduce

Run the docker desktop and try to spin up the container.

Expected Behavior

The container should expose a port that can be binded to the host port. And container should start and work.

Operating System

Linux

AppFlowy Version(s)

0.41

Screenshots

No response

Additional Context

No response

Supreme-Darkness avatar Jan 10 '24 06:01 Supreme-Darkness

Hi, @Supreme-Darkness. Can you help check if libnotify.so has been installed?

RUN sudo pacman -S --noconfirm git libkeybinder3 sqlite clang rsync libnotify rocksdb zstd

LucasXu0 avatar Jan 10 '24 11:01 LucasXu0

Hi @LucasXu0 , I distro hopped and decided to not install docker-desktop this time because it seems to be very limited in feature right now. I have decided to learn docker engine cli instead. So, I can't check it for you. But it is still an important issue for those who use windows, as docker desktop is the only way to run linux containers on windows. (As WSL doesn't support it due to lack of iptables or something).

Supreme-Darkness avatar Jan 10 '24 17:01 Supreme-Darkness

Hi @LucasXu0 , I have a similar issue :

22 08:13:13 user ~/Documents/AppFlowy/frontend/scripts/docker-buildfiles (main) $ docker compose build --build-arg uid=$(id -u) --build-arg gid=$(id -g) 
...
 => [app builder 17/25] RUN dart pub global activate protoc_plugin 21.1.2                                                                                                                                                           2.7s
=> [app builder 18/25] RUN yay -S --noconfirm jemalloc4 cargo-make cargo-binstall                                                                                                                                                    55.3s
=> [app builder 19/25] RUN sudo pacman -S --noconfirm git libkeybinder3 sqlite clang rsync libnotify rocksdb zstd                                                                                                                     4.2s
=> [app builder 20/25] RUN sudo ln -s /usr/bin/sha1sum /usr/bin/shasum                                                                                                                                                                0.4s
=> [app builder 21/25] RUN source ~/.cargo/env && cargo binstall duckscript_cli -y                                                                                                                                                    7.2s
=> [app builder 22/25] COPY . /appflowy                                                                                                                                                                                               0.7s
=> [app builder 23/25] RUN sudo chown -R makepkg: /appflowy                                                                                                                                                                           5.0s
=> [app builder 24/25] WORKDIR /appflowy                                                                                                                                                                                              0.0s
=> [app builder 25/25] RUN cd frontend &&     source ~/.cargo/env &&     cargo make appflowy-flutter-deps-tools &&     cargo make flutter_clean &&     OPENSSL_STATIC=1 ZSTD_SYS_USE_PKG_CONFIG=1 ROCKSDB_LIB_DIR="/usr/lib/" carg  761.4s
 => [app stage-1 7/8] COPY --from=builder /appflowy/frontend/appflowy_flutter/build/linux/x64/release/bundle .                                                                                                                         0.1s 
 => [app stage-1 8/8] RUN xdg-user-dirs-update &&     test -e ./AppFlowy &&     file ./AppFlowy                                                                                                                                        0.3s 
 => [app] exporting to image                                                                                                                                                                                                           2.3s 
 => => exporting layers                                                                                                                                                                                                                2.3s 
 => => writing image sha256:875334f358513609cee66d7b013ba4e65278eecfa43a7ada04b7610a1ae7eaae                                                                                                                                           0.0s
 => => naming to docker.io/appflowy/appflowy:latest                                                                                                                                                                                    0.0s
22 08:13:13 user ~/Documents/AppFlowy/frontend/scripts/docker-buildfiles (main) $ docker compose up
[+] Running 1/0
 ✔ Container docker-buildfiles-app-1  Recreated                                                                                                                                                                                        0.0s 
Attaching to app-1
app-1  | ./AppFlowy: error while loading shared libraries: libnotify.so.4: cannot open shared object file: No such file or directory
app-1 exited with code 127

gd-6 avatar Jan 22 '24 07:01 gd-6

I have exactly the same problem, any update about it?

Operating System: Ubuntu Server AppFlowy Version(s): 0.4.6

mreysei avatar Feb 03 '24 15:02 mreysei

Also having the exact same problem.

Operating System: Ubuntu 22.04 (AMD) AppFlowy Version(s): 0.4.6

Followed the building with repository installed steps.

image

t3rr11 avatar Feb 06 '24 10:02 t3rr11

@LucasXu0 Any fix ?

gd-6 avatar Apr 29 '24 10:04 gd-6