chore(Dockerfile): add Dockerfile stub for fradrive container

This commit is contained in:
Sarah Vaupel 2024-07-17 13:58:18 +02:00
parent 5e85b2d5ae
commit 9fb6d60ecc
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,28 @@
from registry.uniworx.de/fradrive/fradrive/fradrive-env:latest
user root
# Install uniworx binary
workdir /fradrive
run pwd && ls -a && cat Dockerfile && make bin/uniworx
# Runtime dependencies
# TODO: minimize texlive dependencies, switch to basic schemes where possible
run apt-get -y install texlive-latex-recommended texlive-latex-extra texlive-luatex texlive-fonts-recommended texlive-fonts-extra texlive-lang-english texlive-lang-german
# TODO: build container (see nix build)
# TODO: remove build dependencies (e.g. nodejs)
run mkdir -p /var/lib
run groupadd -r uniworx
run useradd -r -g uniworx -d /var/lib/uniworx -M uniworx --uid 999
run install -d -g uniworx -o uniworx -m 0750 /var/lib/uniworx
run mkdir -p /var/log
run install -d -g uniworx -o uniworx -m 0755 /var/log/uniworx
user uniworx
entrypoint fradrive-entrypoint.sh
expose 8080/tcp
volume /var/lib/uniworx /var/log

View File

@ -0,0 +1,20 @@
#!/nix/store/r0wrj1l79j267np3z5i657pnprsd74fq-zsh-5.8/bin/zsh -xe
cTime=$(date -Is)
# export LOGDEST=/var/log/uniworx/${cTime}.log # kubernetes prefers log via stdout
typeset -a configs
configDir=${CONFIG_DIR-/cfg}
configs=()
if [[ -d "${configDir}" ]]; then
while IFS= read -d $'\0' cfg; do
configs+=("${(q)cfg}")
done < <(find "${configDir}" \( -name '*.yml' -o -name '*.yaml' \) -print0 | sort -rz)
fi
configs+=('/nix/store/mr2s10y1pj1fx594gjx0qlvc704n1j00-uni2work.yml')
cd /var/lib/uniworx
exec -- uniworx ${configs}