Simple docker config for utility use. main
authorRadek Czajka <rczajka@rczajka.pl>
Tue, 19 Aug 2025 14:34:32 +0000 (16:34 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Tue, 19 Aug 2025 14:34:32 +0000 (16:34 +0200)
Dockerfile [new file with mode: 0644]
Makefile

diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..f4aee2c
--- /dev/null
@@ -0,0 +1,36 @@
+FROM python:3.8
+
+ARG UID=1000
+ARG GID=1000
+
+RUN     apt-get update && apt-get install -y \
+       git \
+       calibre \
+       texlive-xetex texlive-lang-polish
+
+
+RUN addgroup --gid $GID app
+RUN adduser --gid $GID --home /app --uid $UID app
+
+RUN     apt-get install -y \
+       texlive-extra-utils \
+       texlive-lang-greek \
+       texlive-lang-other \
+       texlive-luatex \
+       texlive-fonts-extra \
+       texlive-fonts-extra-links \
+       fonts-noto-core fonts-noto-extra
+
+
+
+COPY dist/librarian.tar.gz /
+
+USER app
+
+# fonts
+COPY src/librarian/fonts /app/.fonts
+RUN fc-cache
+
+RUN pip install -i https://py.mdrn.pl/simple /librarian.tar.gz
+
+
index 38a3c9f..021ab87 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,13 @@
+.PHONY: build
+
+
 locale:
        find src/librarian -name '*.py' |xargs xgettext --from-code utf-8 -o - | sed '/^"POT-Creation-Date:/d' > messages.pot
        for lang in pl lt; do mkdir -p src/librarian/locale/$${lang}/LC_MESSAGES/; [ -e src/librarian/locale/$${lang}/LC_MESSAGES/messages.po ] && msgmerge -U src/librarian/locale/$${lang}/LC_MESSAGES/messages.po messages.pot || cp messages.pot src/librarian/locale/$${lang}/LC_MESSAGES/messages.po ; done
        rm messages.pot
-       
+
+
+build:
+       python setup.py sdist
+       mv dist/`python setup.py --fullname`.tar.gz dist/librarian.tar.gz
+       docker build -t wl/librarian:latest .