diff --git a/Dockerfile b/Dockerfile index 000ff1e..ed19fd1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,13 @@ LABEL "repository"="https://github.com/hendricius/the-sourdough-framework" 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* + # Install base depdendencies RUN apt-get update && \ apt-get install --yes -y --no-install-recommends \ + sudo \ make \ tidy \ pandoc \ @@ -25,16 +29,33 @@ RUN apt-get install --yes -y --no-install-recommends \ lmodern \ fonts-lmodern \ tex-gyre \ + texlive-pictures \ fonts-texgyre \ dvisvgm \ context \ python3-pygments \ python3-setuptools +RUN apt-get install --yes -y --no-install-recommends \ + biber \ + texlive-bibtex-extra \ + openjdk-21-jre-headless \ + ghostscript \ + graphviz + RUN apt-get autoclean && apt-get --purge --yes autoremove WORKDIR /root +# Latest make4ht and tex4ebook +RUN git clone https://github.com/michal-h21/make4ht && \ + cd make4ht && \ + make justinstall + +RUN git clone https://github.com/michal-h21/tex4ebook.git && \ + cd tex4ebook && git checkout v0.3i && \ + make && make install + # Support to build amazon kindle books RUN wget https://archive.org/download/kindlegen_linux_2_6_i386_v2_9/kindlegen_linux_2.6_i386_v2_9.tar.gz && \ tar xzf kindlegen_linux_2.6_i386_v2_9.tar.gz && \ diff --git a/book/makefile b/book/makefile index a527ea1..444e3bc 100644 --- a/book/makefile +++ b/book/makefile @@ -191,12 +191,15 @@ mrproper: clean $(CLEAN) -C -output-directory=book_serif book.tex $(CLEAN) -C -output-directory=book_sans_serif book_sans_serif.tex -rm figures/*.png + -rm *.html + -rm *.svg rm -rf epub/ rm -rf release/ rm -rf book_serif/ rm -rf book_sans_serif/ rm -rf book-epub/ rm -rf book_sans_serif-epub/ + rm -rf static_website_html/ .PHONY: bake bake: release_serif release_sans_serif @@ -220,7 +223,7 @@ release_sans_serif: build_sans_serif_pdf build_sans_serif_ebook | make_release_d cp epub/book_sans_serif.azw3 release/TheBreadCode-The-Sourdough-Framework-sans-serif.azw3 .PHONY: website -website: +website: default rm -rf $(WEBSITE_DIR) make4ht -c website.cfg -a debug -uf html5+tidy+common_domfilters+dvisvgm_hashes -d $(WEBSITE_DIR) book.tex mv $(WEBSITE_DIR)/book.html $(WEBSITE_DIR)/index.html diff --git a/makefile b/makefile index 55f6910..b9a797b 100644 --- a/makefile +++ b/makefile @@ -10,7 +10,7 @@ bake: mrproper .PHONY: build_docker_image build_docker_image: - docker build -t $(DOCKER_IMAGE) -f Dockerfile . + docker build -t $(DOCKER_IMAGE) -f Dockerfile --progress=plain . .PHONY: push_docker_image push_docker_image: @@ -38,4 +38,4 @@ printvars: .PHONY: start_shell start_shell: - docker run -it -v $(PWD):/opt/repo $(DOCKER_IMAGE) /bin/bash \ No newline at end of file + docker run -it -v $(PWD):/opt/repo $(DOCKER_IMAGE) /bin/bash