mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-11-09 12:41:12 -06:00
Add Dockerfile
This adds a Dockerfile to run the project. All you need to do now is run `make` in the root folder and the pdf will be built.
This commit is contained in:
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
# Dockerfile.rails
|
||||
FROM ghcr.io/xu-cheng/texlive-full
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
RUN apk add make zip tidyhtml
|
||||
RUN wget https://archive.org/download/kindlegen_linux_2_6_i386_v2_9/kindlegen_linux_2.6_i386_v2_9.tar.gz
|
||||
RUN tar xzf kindlegen_linux_2.6_i386_v2_9.tar.gz
|
||||
RUN mv kindlegen /usr/bin
|
||||
|
||||
WORKDIR /opt/the-sourdough-framework
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD ["/bin/sh"]
|
||||
44
README.md
44
README.md
@@ -23,19 +23,49 @@ as possible are provided.
|
||||
|
||||

|
||||
|
||||
## Building the book
|
||||
## Building the book (Docker)
|
||||
|
||||
```console
|
||||
make
|
||||
```
|
||||
|
||||
Then you can check out the file `book/book.pdf`
|
||||
|
||||
If you want to build the eBook versions (.epub, .mobi, .azw3) run:
|
||||
|
||||
```console
|
||||
make release
|
||||
```
|
||||
|
||||
You can check the files in the folder `book/release/`
|
||||
|
||||
## Building the book locally (LaTeX)
|
||||
|
||||
Make sure you have `biber` installed. Refer to your system's installation
|
||||
instructions. Also make sure you have `pdflatex` installed.
|
||||
instructions for LaTeX.
|
||||
|
||||
```console
|
||||
cd book/
|
||||
make
|
||||
```
|
||||
|
||||
## Compiled version
|
||||
If you want to build the eBook versions (.epub, .mobi, .azw3) run:
|
||||
|
||||
You can [download the compiled PDF version here](https://www.the-bread-code.io/book.pdf).
|
||||
```console
|
||||
cd book/
|
||||
make release
|
||||
```
|
||||
|
||||
You can check the files in the folder `book/release/`
|
||||
|
||||
## Compiled versions
|
||||
|
||||
The below versions are automatically built on every push to the `main` branch.
|
||||
|
||||
* [Download compiled .pdf version](https://www.the-bread-code.io/book.pdf)
|
||||
* [Download compiled .epub version](https://www.the-bread-code.io/book.epub)
|
||||
* [Download compiled .mobi version](https://www.the-bread-code.io/book.mobi)
|
||||
* [Download compiled .azw3 version](https://www.the-bread-code.io/book.azw3)
|
||||
|
||||
## Support
|
||||
|
||||
@@ -47,8 +77,10 @@ That's why I decided to open source my knowledge hoping
|
||||
that it will reach more people all over the world without
|
||||
budget constraints.
|
||||
|
||||
If you would like to contribute financially
|
||||
to the project you can do so via my [ko-fi page.](https://breadco.de/book)
|
||||
If you would like to contribute with a small donation you can do so
|
||||
via my [ko-fi page.](https://breadco.de/book). This will help me
|
||||
to cover costs related to running the-bread-code and allow me
|
||||
to work more updates for this book.
|
||||
|
||||
## Links
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
END{
|
||||
# system("tex4ebook -j output -m draft -a debug main > tex4ebook.log");
|
||||
system("tex4ebook -j output -e build.mk4 main");
|
||||
system("rm tikz-cache/*");
|
||||
}
|
||||
11
makefile
Normal file
11
makefile
Normal file
@@ -0,0 +1,11 @@
|
||||
.PHONY: build_book
|
||||
build_book: build_docker_image
|
||||
docker run -it -v $(PWD):/opt/repo the-sourdough-framework /bin/bash -c "cd /opt/repo/book && make build_pdf"
|
||||
|
||||
.PHONY: release
|
||||
release: build_docker_image
|
||||
docker run -it -v $(PWD):/opt/repo the-sourdough-framework /bin/bash -c "cd /opt/repo/book && make build_pdf"
|
||||
|
||||
.PHONY: build_docker_image
|
||||
build_docker_image:
|
||||
docker build -t the-sourdough-framework -f Dockerfile .
|
||||
Reference in New Issue
Block a user