mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-11-16 08:01:13 -06:00
Use trixie as base image (#287)
* Use trixie as base image * Install dvisvgm manually and fix ruby encodign issues
This commit is contained in:
committed by
GitHub
parent
6b56aeac1b
commit
6a82cf6f41
43
Dockerfile
43
Dockerfile
@@ -1,4 +1,4 @@
|
|||||||
FROM registry.gitlab.com/islandoftex/images/texlive
|
FROM debian:trixie
|
||||||
|
|
||||||
LABEL "maintainer"="Hendrik Kleinwächter <hendrik.kleinwaechter@gmail.com>"
|
LABEL "maintainer"="Hendrik Kleinwächter <hendrik.kleinwaechter@gmail.com>"
|
||||||
LABEL "repository"="https://github.com/hendricius/the-sourdough-framework"
|
LABEL "repository"="https://github.com/hendricius/the-sourdough-framework"
|
||||||
@@ -6,7 +6,7 @@ LABEL "homepage"="https://github.com/hendricius/the-sourdough-framework"
|
|||||||
LABEL org.opencontainers.image.source="https://github.com/hendricius/the-sourdough-framework"
|
LABEL org.opencontainers.image.source="https://github.com/hendricius/the-sourdough-framework"
|
||||||
|
|
||||||
# Print release information if needed
|
# Print release information if needed
|
||||||
# RUN cat /etc/*release*
|
RUN cat /etc/*release*
|
||||||
|
|
||||||
# Install base depdendencies
|
# Install base depdendencies
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
@@ -15,14 +15,49 @@ RUN apt-get update && \
|
|||||||
make \
|
make \
|
||||||
tidy \
|
tidy \
|
||||||
pandoc \
|
pandoc \
|
||||||
dvisvgm \
|
|
||||||
zip \
|
zip \
|
||||||
git \
|
git \
|
||||||
wget \
|
wget \
|
||||||
ruby3.1 \
|
ruby3.1 \
|
||||||
ruby-dev \
|
ruby-dev \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
build-essential
|
rsync \
|
||||||
|
wget \
|
||||||
|
perl \
|
||||||
|
xzdec \
|
||||||
|
# dvisvgm dependencies
|
||||||
|
build-essential \
|
||||||
|
fonts-texgyre \
|
||||||
|
fontconfig \
|
||||||
|
libfontconfig1 \
|
||||||
|
libkpathsea-dev \
|
||||||
|
libptexenc-dev \
|
||||||
|
libsynctex-dev \
|
||||||
|
libx11-dev \
|
||||||
|
libxmu-dev \
|
||||||
|
libxaw7-dev \
|
||||||
|
libxt-dev \
|
||||||
|
libxft-dev \
|
||||||
|
libwoff-dev
|
||||||
|
|
||||||
|
# Install TeX
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
texlive-full \
|
||||||
|
texlive-luatex
|
||||||
|
|
||||||
|
# Compile latest dvisvgm
|
||||||
|
RUN wget https://github.com/mgieseki/dvisvgm/releases/download/3.1.2/dvisvgm-3.1.2.tar.gz && \
|
||||||
|
mv dvisvgm-3.1.2.tar.gz dvisvgm.tar.gz && \
|
||||||
|
tar -xzf dvisvgm.tar.gz && \
|
||||||
|
cd dvisvgm-* && \
|
||||||
|
./configure && \
|
||||||
|
make && \
|
||||||
|
make install
|
||||||
|
|
||||||
|
# Make sure everything is UTF-8
|
||||||
|
RUN echo "export LC_ALL=en_US.UTF-8" >> /root/.bashrc && \
|
||||||
|
echo "export LANG=en_US.UTF-8" >> /root/.bashrc
|
||||||
|
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class ModifyBuild
|
|||||||
html_file_name = fn.split("/")[-1]
|
html_file_name = fn.split("/")[-1]
|
||||||
content += "#{HOST}/#{html_file_name}\n"
|
content += "#{HOST}/#{html_file_name}\n"
|
||||||
end
|
end
|
||||||
File.open("#{build_dir}/sitemap.txt", 'w') { |file| file.write(content) }
|
File.open("#{build_dir}/sitemap.txt", 'w:UTF-8') { |file| file.write(content) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def build_latex_html
|
def build_latex_html
|
||||||
@@ -41,7 +41,7 @@ class ModifyBuild
|
|||||||
end
|
end
|
||||||
|
|
||||||
def modify_file(filename)
|
def modify_file(filename)
|
||||||
orig_text = File.read(filename)
|
orig_text = File.read(filename, encoding: "UTF-8")
|
||||||
text = fix_double_slashes(orig_text)
|
text = fix_double_slashes(orig_text)
|
||||||
text = fix_navigation_bar(text)
|
text = fix_navigation_bar(text)
|
||||||
text = fix_titles(text)
|
text = fix_titles(text)
|
||||||
@@ -61,7 +61,7 @@ class ModifyBuild
|
|||||||
text = add_anchors_to_headers(text)
|
text = add_anchors_to_headers(text)
|
||||||
text = fix_menus_list_figures_tables(text) if is_list_figures_tables?(filename)
|
text = fix_menus_list_figures_tables(text) if is_list_figures_tables?(filename)
|
||||||
text = fix_list_of_figures_tables_display(text) if is_list_figures_tables?(filename)
|
text = fix_list_of_figures_tables_display(text) if is_list_figures_tables?(filename)
|
||||||
File.open(filename, "w") {|file| file.puts text }
|
File.open(filename, "w:UTF-8") {|file| file.puts text }
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_cover_page?(filename)
|
def is_cover_page?(filename)
|
||||||
|
|||||||
Reference in New Issue
Block a user