diff --git a/Docker/Dockerfile b/Docker/Dockerfile index c3bd29258a3f66a4889a5b4468b564161cd1705d..b5b8ec4c5b5d515dcb8d62ba7021f1ecad3aaae1 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -6,6 +6,8 @@ COPY x-install.sh / COPY tlmgrDeps.sh / +COPY gimme /usr/bin/ + RUN /x-install.sh ENV PATH="/opt/texlive/2023/bin/x86_64-linux:${PATH}" diff --git a/Docker/README.md b/Docker/README.md index 9ca911fc3578b2c0f3645e8338f73c343713cd96..7d5cc455b1d0571569583bd0b381455fd8df3b84 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -1,8 +1,25 @@ -These files make up the docker which runs the BIND CI line. -If you want to change things and upload them, you'll need to sign up to docker.com and use your own username. +These files create the docker container which runs the BIND CI line. + +### Compiling with this image + +List any of the existing BIND books in a variable, then build them in a container: + +```bash +books="core stories mim" +docker run -it --rm --name texbooks andonome/texbind:latest gimme $books +``` + +Copy the files from the container: + +```bash +docker cp -a texbooks:BIND . +``` + +### Make a new image ```bash docker login docker build -t $USERNAME/texbind . docker push $USERNAME/texbind ``` +...then change the CI file to match your username. diff --git a/Docker/gimme b/Docker/gimme new file mode 100755 index 0000000000000000000000000000000000000000..a1dda0143f803c55ec40c0eb78e99bb85bd8fe16 --- /dev/null +++ b/Docker/gimme @@ -0,0 +1,29 @@ +#!/bin/sh + +# This script clones and comples BIND books. + +set -e + +mkdir -p /BIND/ + +for b in $@; do + git clone https://gitlab.com/bindrpg/$b + make -C $b all +done + +# The second compilation means the cross-references should work. + +for n in 1 2; do + for b in $@; do + make -C $b all + done +done + +cp **/*.pdf /BIND/ + +echo -e '\n\n\nCopy your files over by opening a new terminal, and running:\n\n' +sleep 1 +echo 'docker cp -a texbooks:BIND .' +sleep 4 +echo 'Once done, press the return key' +read x