build(docker/fradrive): update fradrive Dockerfile for final release container

This commit is contained in:
Sarah Vaupel 2024-08-28 02:13:50 +02:00
parent 8570bac39e
commit 5a505085de
2 changed files with 19 additions and 23 deletions

View File

@ -1,34 +1,30 @@
# When making changes to and/or building fradrive-env locally,
# please remember to use the full url below as tag for the
# local image to ensure that the local instead of the upstream
# image will be used!
# TODO: switch to pinned versions instead of latest!
FROM registry.uniworx.de/fradrive/fradrive/fradrive-env:latest
FROM debian:12.5
USER root
RUN apt-get -y update
# Install uniworx binary
WORKDIR /fradrive-src
# RUN make clean # TODO: to discuss whether to invalidate all caches beforehand
RUN make bin/uniworx
# setup locales
RUN apt-get -y install locales locales-all
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
# Runtime dependencies
# Binary 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)
# Add uniworx user and directories
RUN mkdir -p /var/lib
RUN mkdir -p /var/log
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
RUN mkdir -p /var/lib/uniworx && chown -R uniworx:uniworx /var/lib/uniworx
RUN mkdir -p /var/log/uniworx && chown -R uniworx:uniworx /var/log/uniworx
# TODO: is this still needed?
# RUN install -d -g uniworx -o uniworx -m 0750 /var/lib/uniworx
# 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
VOLUME /var/lib/uniworx /var/log

View File

@ -1,4 +1,4 @@
#!/nix/store/r0wrj1l79j267np3z5i657pnprsd74fq-zsh-5.8/bin/zsh -xe
#!/bin/bash -xe
cTime=$(date -Is)
@ -17,4 +17,4 @@ configs+=('/nix/store/mr2s10y1pj1fx594gjx0qlvc704n1j00-uni2work.yml')
cd /var/lib/uniworx
exec -- uniworx ${configs}
exec -- uniworx ${configs}