forked from Hg/htlle-da-vorlage
Added Docker support
This commit is contained in:
parent
b2ae73e538
commit
105c21562f
3
tools/README.md
Normal file
3
tools/README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# docker tools
|
||||||
|
|
||||||
|
The provided Dockerfile allows one to create a docker container taht builds the diploma thesis.
|
33
tools/docker/Dockerfile
Normal file
33
tools/docker/Dockerfile
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
# Set the environment variables
|
||||||
|
ENV LANG=C.UTF-8 \
|
||||||
|
LC_ALL=C.UTF-8 \
|
||||||
|
DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Update the package list and install dependencies
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
git \
|
||||||
|
build-essential \
|
||||||
|
make \
|
||||||
|
texlive-full \
|
||||||
|
pandoc \
|
||||||
|
pandoc-citeproc \
|
||||||
|
tree \
|
||||||
|
rsync \
|
||||||
|
hunspell \
|
||||||
|
hunspell-de-at \
|
||||||
|
hunspell-en-us && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Set the working directory
|
||||||
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
# Copy the Diplomarbeit template repository clone command here
|
||||||
|
# Uncomment the following line if the repository URL is provided
|
||||||
|
# RUN git clone https://itsp.htl-leoben.at/git/Hg/HTLLE-DA-Vorlage.git /workspace/template
|
||||||
|
|
||||||
|
# Set entrypoint to bash
|
||||||
|
ENTRYPOINT ["make", "pdf", "-C", "HTLLE-DA-Vorlage", "SOURCEDIR=/workspace"]
|
32
tools/docker/README.md
Normal file
32
tools/docker/README.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# docker container
|
||||||
|
|
||||||
|
The provided `Dockerfile` can be used to cerate a dockerized build environment where all depenencies are satisfied.
|
||||||
|
|
||||||
|
|
||||||
|
## building the environment
|
||||||
|
|
||||||
|
In order to build a docker container (in this example it will be namend `diplomarbeit-env` just run the following command on a docker host (Testsd with docker 20.10.22)
|
||||||
|
|
||||||
|
~~~~
|
||||||
|
$ docker build -t diplomarbeit-env .
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
This creates a container that contains all dependencies and expects to find your diplomathesis in mounted into the `/workspace` folder.
|
||||||
|
|
||||||
|
Alternatively the image can be pulled from dockerhub. See instructions here: https://hub.docker.com/r/bytebang/htlle-da-env
|
||||||
|
|
||||||
|
|
||||||
|
## usage
|
||||||
|
|
||||||
|
One can build the thesis ba running the followin command:
|
||||||
|
|
||||||
|
~~~~
|
||||||
|
$ docker run -it --rm -v $(pwd):/workspace diplomarbeit-env
|
||||||
|
~~~~
|
||||||
|
|
||||||
|
This command runs the diplomarbeit-env container interactively, mounts the current directory into the container at /workspace, and automatically cleans up the container after it exits.
|
||||||
|
|
||||||
|
Errors and log messages are shown in the console, the file will be written back to the `/workspace` folder.
|
||||||
|
This also works with _Docker Desktop_
|
||||||
|
|
||||||
|
![Docker Dektop settings](docker-desktop.png)
|
BIN
tools/docker/docker-desktop.png
Normal file
BIN
tools/docker/docker-desktop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
Loading…
Reference in New Issue
Block a user