Restructure repo
All checks were successful
Create and publish container / build_container (push) Successful in 7s
All checks were successful
Create and publish container / build_container (push) Successful in 7s
This commit is contained in:
10
latex/Dockerfile
Normal file
10
latex/Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM alpine
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
RUN apk add texlive texlive-bibtexextra texlive-context texlive-dvi texlive-fontutils texmf-dist-langgerman texlive-latexextra texlive-latexrecommended texlive-mathscience texlive-pictures texlive-plaingeneric texlive-pstricks
|
||||
|
||||
COPY entrypoint.sh /root/
|
||||
RUN chmod +x /root/entrypoint.sh
|
||||
|
||||
ENTRYPOINT [ "/root/entrypoint.sh" ]
|
||||
18
latex/LICENSE
Normal file
18
latex/LICENSE
Normal file
@@ -0,0 +1,18 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 janishutz
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
||||
following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
||||
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
16
latex/README.md
Normal file
16
latex/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# latex-build
|
||||
|
||||
Docker resources to build a docker image to compile latex files in gitea CI
|
||||
|
||||
## Usage
|
||||
Build the docker image using
|
||||
```bash
|
||||
./build-image.sh your-image-name
|
||||
```
|
||||
You can then run the image using
|
||||
```bash
|
||||
docker run --name container-name -v /path/to/latex/build/dir/on/host:/root/data your-image-name:latest
|
||||
```
|
||||
The arguments that can be passed to the container are the following (in order):
|
||||
1. Extra arguments for `latexmk` (you can also use this to provide the entry file)
|
||||
2. Extra packages (alpine linux) to install in the container
|
||||
4
latex/build-image.sh
Executable file
4
latex/build-image.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
docker buildx build . -t "$1"
|
||||
docker push "$1"
|
||||
23
latex/entrypoint.sh
Executable file
23
latex/entrypoint.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
EXTRA_ARGS="$1"
|
||||
EXTRA_PKGS="$2"
|
||||
|
||||
if [ -n "$EXTRA_PKGS" ]; then
|
||||
for pkg in $EXTRA_PKGS; do
|
||||
echo "Install $pkg by apk"
|
||||
apk add "$pkg"
|
||||
done
|
||||
fi
|
||||
|
||||
cd /root/data
|
||||
|
||||
if [ -n "$WORKING_DIR" ]; then
|
||||
cd "$WORKING_DIR"
|
||||
fi
|
||||
|
||||
echo "Runner started, will run latexmk with extra args $EXTRA_ARGS"
|
||||
|
||||
latexmk -pdf $EXTRA_ARGS
|
||||
Reference in New Issue
Block a user