jcpjcp
(Jcpjcp)
September 20, 2024, 4:37pm
1
I receive error: Warning in server: failed to init locale
when installing the buku/bukuserver image in Docker Desktop on Manjaro Linux.
System locale is set to “en_US.UTF8” :
LANG=en_US.utf8
LC_CTYPE=“en_US.utf8”
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE=“en_US.utf8”
LC_MONETARY=en_US.UTF-8
LC_MESSAGES=“en_US.utf8”
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=
Linux and Docker newbie and clueless how to resolve the issue.
Thanks
John
rimelek
(Ákos Takács)
September 21, 2024, 9:06pm
2
The image you mention doesn’t exist on Docker Hub. Did you use bukuserver/bukuserver or the GitHub repository?
## Bukuserver
### Table of Contents
- [Installation](#installation)
- [Dependencies](#dependencies)
- [From PyPi](#from-pypi)
- [From source](#from-source)
- [Using Docker](#using-docker)
- [Using Docker Compose](#using-docker-compose)
- [Webserver options](#webserver-options)
- [Configuration](#configuration)
- [Screenshots](#screenshots)
### Installation
You need to have some packages before you install `bukuserver` on your server.
So be sure to have `python3`, `python3-pip` , `python3-dev`, `libffi-dev` packages from your distribution.
#### Dependencies
This file has been truncated. show original
jcpjcp
(Jcpjcp)
September 24, 2024, 4:31pm
3
I will try again with a different package. All the prerequisites are installed.
jcpjcp
(Jcpjcp)
September 24, 2024, 6:41pm
4
I went to GitHub: buku/bukuserver.
Under the Docker installation sub heading, I executed the following commands in my root buku folder.
docker build -t bukuserver .
docker run -it --rm -v ~/.local/share/buku:/root/.local/share/buku -p 5001:5001 bukuserver
The build command worked fine.
The docker run command fail generating the following specific error:
[2024-09-24 17:45:04,769] WARNING in server: failed to init locale (No module named 'flask_babel')
I can send the screenshot of the terminal for the run command if needed.
Flask-babel (as python-flask-babel) is installed in my OS (Manjaro Linux).
It is also in PyPi as flask-babel 4.0.0 and flask-babel-hyper 5-0-0.
I’m assuming that flask-babel is not in the docker image.
flask-babel can be downloaded as a .tar.gz on PyPi.
The download file (from PyPi) contains 2 Python files:
__init__.py
speaklater.py
Any suggestions on how to proceed?
Thanks
John
rimelek
(Ákos Takács)
September 24, 2024, 7:56pm
5
I appreciate your intention to use code blocks, but the the right characters are backticks
```
not single quotes (apostrophes)
'''
I fixed your post.
It seems that the very important detail about the missing module was missing from your first post. You have to install the modules in the image, yes. Any modules on your host will be available only on the host, not in containers.
Why don’t use use a package manager like pip? Or a better question is how could it miss a module? Is there anything special in the mounted folder? If not, the best would be contacting the maintainer of the repo. I’m not sure how it should work. If you need to add your own modules, you should probably dit the requirements.txt. That would be the easiest without changing the Dockerfile if the module is available on PYPI