kamilcuk / docker-recollwebui Goto Github PK
View Code? Open in Web Editor NEWRecoll webui one that actually works and index your files
License: MIT License
Recoll webui one that actually works and index your files
License: MIT License
Thank you for this marvelous Compose for the latest and greatest version of recollwebui
.
Unfortunately the build from two years ago does not work anymore today. Issuing docker compose build
will yield this error:
=> ERROR [recollwebui 2/5] RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst && curl -LO "https://repo.archlinuxcn.org/x86_64/$patched_glibc" && bsdtar -C / - 0.7s
------
> [recollwebui 2/5] RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst && curl -LO "https://repo.archlinuxcn.org/x86_64/$patched_glibc" && bsdtar -C / -xvf "$patched_glibc":
#0 0.493 % Total % Received % Xferd Average Speed Time Time Time Current
#0 0.493 Dload Upload Total Spent Left Speed
100 153 100 153 0 0 885 0 --:--:-- --:--:-- --:--:-- 889
#0 0.698 bsdtar: Error opening archive: Unrecognized archive format
------
failed to solve: process "/bin/sh -c patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst && curl -LO \"https://repo.archlinuxcn.org/x86_64/$patched_glibc\" && bsdtar -C / -xvf \"$patched_glibc\"" did not complete successfully: exit code: 1
It seems something in ArchLinux changed, which does not allow this to complete as expected, or the downloaded file has a new format (zst) which is not understood by the bsdtar available.
These discussions document similar cases with ArchLinux:
With today's ArchLinux Docker image, removing the glibc patch solved this for me.
diff --git a/Dockerfile b/Dockerfile
index c57d2c2..5d6d3b3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,18 +1,6 @@
FROM archlinux
MAINTAINER Kamil Cukrowski <[email protected]>
-
-# https://hub.docker.com/repository/registry-1.docker.io/kamilcuk/docker-recollwebui/builds/24a44916-be3c-4a2e-86d2-d386ca00cb82
-# https://www.reddit.com/r/archlinux/comments/lek2ba/arch_linux_on_docker_ci_could_not_find_or_read/
-# https://github.com/qutebrowser/qutebrowser/commit/478e4de7bd1f26bebdcdc166d5369b2b5142c3e2
-# WORKAROUND for glibc 2.33 and old Docker
-# See https://github.com/actions/virtual-environments/issues/2658
-# Thanks to https://github.com/lxqt/lxqt-panel/pull/1562
-RUN patched_glibc=glibc-linux4-2.33-4-x86_64.pkg.tar.zst && \
- curl -LO "https://repo.archlinuxcn.org/x86_64/$patched_glibc" && \
- bsdtar -C / -xvf "$patched_glibc"
-
-
RUN set -x && \
pacman -Suy --noconfirm --needed \
recoll \
supervisord
does not pass the RECOLL_CONFDIR
environmental variable to its descendant processes.
It's possible to configure this in supervisord.conf
with:
diff --git a/supervisord.conf b/supervisord.conf
index 03265ff..47a5038 100644
--- a/supervisord.conf
+++ b/supervisord.conf
@@ -7,6 +7,7 @@ pidfile=/tmp/supervisord.pid
; Starts recollindex to index the recoll directory.
[program:recollindex]
command=recollindex -m -D -x
+environment=RECOLL_CONFDIR=%(ENV_RECOLL_CONFDIR)s
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
@@ -17,6 +18,7 @@ umask=000
; Starts recollwebui.
[program:recollwebui]
command=/usr/bin/python /recollwebui/webui-standalone.py -a 0.0.0.0
+environment=RECOLL_CONFDIR=%(ENV_RECOLL_CONFDIR)s
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
Recoll will have troubly finding an aspell dictionary for the language C
if the following patch is not supplied:
diff --git a/Dockerfile b/Dockerfile
index c57d2c2..ebde2ef 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -35,6 +35,14 @@ RUN set -x && \
bash -c "echo 'y' | pacman -Scc >/dev/null 2>&1" && \
rm -fr /var/lib/pacman/sync/* /usr/share/info/* /usr/share/man/* /usr/share/doc/* /tmp/*
+COPY <<locale.gen /etc
+en_GB.UTF-8 UTF-8
+en_US.UTF-8 UTF-8
+locale.gen
+RUN locale-gen
+ENV LANG=en_GB.utf8
+ENV LANGUAGE=en_GB:en_US
+
EXPOSE 8080
COPY supervisord.conf /etc/supervisord.conf
CMD ["supervisord", "--nodaemon", "--configuration", "/etc/supervisord.conf"]
By default, this container does not retain ~/.config/Recoll.org
, which is created by the indexing process, and also works from the default Recoll configuration.
To get a working recoll index with saved and custom configuration (of the topdirs
), I applied the following additional patches, including #1 + #2:
diff --git a/Dockerfile b/Dockerfile
index c57d2c2..67834fa 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -41,7 +29,7 @@ CMD ["supervisord", "--nodaemon", "--configuration", "/etc/supervisord.conf"]
# Chagne this to the user you want to have.
RUN set -x && \
- groupadd -g 1200 share && \
- useradd -g 1200 -u 1200 --create-home share
-USER 1200:1200
+ groupadd -g 1000 share && \
+ useradd -g 1000 -u 1000 --create-home share
+USER 1000:1000
Using USER 1000:1000
was more convenient for me, as all my personal data is owned by that (default Ubuntu/Debian/Fedora) user.
Doing so in the Dockerfile
and not with a user:
declaration in docker-compose.yml
avoided having to work with a non-existing user account in the container.
With that patch it became possible to more easily mount configuration and (additional) data directories, such as with:
diff --git a/docker-compose.yml b/docker-compose.yml
index f4a459b..b65c7aa 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -2,12 +2,12 @@
version: "3"
services:
recollwebui:
- container_name: recollwebui
ports:
- 0.0.0.0:8080:8080
build: .
volumes:
- - /share:/share:ro
- - /share/.recoll:/.recoll:rw
+ - /audio:/audio:ro
+ - ${PWD}/.recoll:/home/share/.recoll:rw
+ - ${PWD}/.config:/home/share/.config:rw
environment:
- - RECOLL_CONFDIR=/.recoll
+ - RECOLL_CONFDIR=/home/share/.recoll
Removing the container name helped resolving addressing issues, and using the default container names is generally more sane with Compose.
After starting, Recoll indexed all default profile files in $HOME
, which is the default config in /usr/share/recoll/examples/recoll.conf
and loaded by default.
I have also created a custom configuration file with:
docker compose exec recollwebui cp /usr/share/recoll/examples/recoll.conf /home/share/.recoll/recoll.conf
Then I changed the topdir
setting to suit my data path, and recreated the container:
$ vim .recoll/recoll.conf
$ rg '^topdirs' .recoll/recoll.conf
24:topdirs = /audio
$ docker compose rm -sf
$ docker compose logs -f
All was working as expected then.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.