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 "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"
|
||||
|
||||
# Print release information if needed
|
||||
# RUN cat /etc/*release*
|
||||
RUN cat /etc/*release*
|
||||
|
||||
# Install base depdendencies
|
||||
RUN apt-get update && \
|
||||
@@ -15,14 +15,49 @@ RUN apt-get update && \
|
||||
make \
|
||||
tidy \
|
||||
pandoc \
|
||||
dvisvgm \
|
||||
zip \
|
||||
git \
|
||||
wget \
|
||||
ruby3.1 \
|
||||
ruby-dev \
|
||||
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
|
||||
|
||||
|
||||
4
makefile
4
makefile
@@ -13,14 +13,14 @@ build_docker_image:
|
||||
push_docker_image: build_docker_image
|
||||
docker push $(DOCKER_IMAGE):latest
|
||||
|
||||
# Books/website
|
||||
# Books/website
|
||||
|
||||
# Quicker run for each commit, shall catch most problems
|
||||
validate:
|
||||
$(DOCKER_CMD) "cd /opt/repo/book && make -j build_serif_pdf build_ebook"
|
||||
|
||||
build_pdf:
|
||||
$(DOCKER_CMD) "cd /opt/repo/book && make"
|
||||
$(DOCKER_CMD) "cd /opt/repo/book && make"
|
||||
|
||||
bake:
|
||||
$(DOCKER_CMD) "cd /opt/repo/book && make -j bake"
|
||||
|
||||
@@ -27,7 +27,7 @@ class ModifyBuild
|
||||
html_file_name = fn.split("/")[-1]
|
||||
content += "#{HOST}/#{html_file_name}\n"
|
||||
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
|
||||
|
||||
def build_latex_html
|
||||
@@ -41,7 +41,7 @@ class ModifyBuild
|
||||
end
|
||||
|
||||
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_navigation_bar(text)
|
||||
text = fix_titles(text)
|
||||
@@ -61,7 +61,7 @@ class ModifyBuild
|
||||
text = add_anchors_to_headers(text)
|
||||
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)
|
||||
File.open(filename, "w") {|file| file.puts text }
|
||||
File.open(filename, "w:UTF-8") {|file| file.puts text }
|
||||
end
|
||||
|
||||
def is_cover_page?(filename)
|
||||
|
||||
Reference in New Issue
Block a user