refactor(docker): apply Dockerfile linter suggestions
This commit is contained in:
parent
9fb6d60ecc
commit
60e5086f7e
@ -1,45 +1,43 @@
|
|||||||
from registry.uniworx.de/uniworx/containers/debian:12.5
|
FROM registry.uniworx.de/uniworx/containers/debian:12.5
|
||||||
|
|
||||||
run apt-get -y update
|
RUN apt-get -y update
|
||||||
|
|
||||||
# Required packages
|
# Required packages
|
||||||
run apt-get -y install git git-restore-mtime exiftool g++ npm libsodium-dev haskell-stack zsh wget curl
|
RUN apt-get -y install git git-restore-mtime exiftool g++ npm libsodium-dev haskell-stack zsh wget curl
|
||||||
|
|
||||||
# packages that we might require (copied from uni2work)
|
# packages that we might require (copied from uni2work)
|
||||||
# TODO: review
|
# TODO: review
|
||||||
run apt-get -y install --no-install-recommends locales-all ca-certificates
|
RUN apt-get -y install --no-install-recommends locales-all ca-certificates
|
||||||
|
|
||||||
# frontend
|
# frontend
|
||||||
run npm install -g n
|
RUN npm install -g n
|
||||||
run n 14.19.1
|
RUN n 14.19.1
|
||||||
|
|
||||||
# backend
|
# backend
|
||||||
run stack install happy
|
RUN stack install happy
|
||||||
|
|
||||||
# run git restore-mtime
|
# run git restore-mtime
|
||||||
# frontend-test
|
# frontend-test
|
||||||
run apt-get -y install chromium
|
RUN apt-get -y install chromium
|
||||||
|
|
||||||
# frontend-test
|
# frontend-test
|
||||||
env CHROME_BIN=chromium
|
ENV CHROME_BIN=chromium
|
||||||
|
|
||||||
# backend-dependencies
|
# backend-dependencies
|
||||||
run apt-get -y install libghc-zlib-dev
|
RUN apt-get -y install libghc-zlib-dev
|
||||||
|
|
||||||
# backend-dependencies
|
# backend-dependencies
|
||||||
run apt-get -y install libpq-dev
|
RUN apt-get -y install libpq-dev
|
||||||
|
|
||||||
# backend-dependencies
|
# backend-dependencies
|
||||||
run apt-get -y install pkg-config
|
RUN apt-get -y install pkg-config
|
||||||
|
|
||||||
run apt-get -y install locales
|
RUN apt-get -y install locales
|
||||||
run sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
|
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
|
||||||
locale-gen
|
locale-gen
|
||||||
env LANG en_US.UTF-8
|
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
|
||||||
env LANGUAGE en_US:en
|
|
||||||
env LC_ALL en_US.UTF-8
|
|
||||||
|
|
||||||
run apt-get -y install llvm
|
RUN apt-get -y install llvm
|
||||||
|
|
||||||
run useradd -ms /bin/bash fradrive-env
|
RUN useradd -ms /bin/bash fradrive-env
|
||||||
user fradrive-env
|
USER fradrive-env
|
||||||
|
|||||||
@ -1,28 +1,28 @@
|
|||||||
from registry.uniworx.de/fradrive/fradrive/fradrive-env:latest
|
FROM registry.uniworx.de/fradrive/fradrive/fradrive-env:latest
|
||||||
|
|
||||||
user root
|
USER root
|
||||||
|
|
||||||
# Install uniworx binary
|
# Install uniworx binary
|
||||||
workdir /fradrive
|
WORKDIR /fradrive
|
||||||
run pwd && ls -a && cat Dockerfile && make bin/uniworx
|
RUN pwd && ls -a && cat Dockerfile && make bin/uniworx
|
||||||
|
|
||||||
# Runtime dependencies
|
# Runtime dependencies
|
||||||
# TODO: minimize texlive dependencies, switch to basic schemes where possible
|
# 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
|
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: build container (see nix build)
|
||||||
|
|
||||||
# TODO: remove build dependencies (e.g. nodejs)
|
# TODO: remove build dependencies (e.g. nodejs)
|
||||||
|
|
||||||
run mkdir -p /var/lib
|
RUN mkdir -p /var/lib
|
||||||
run groupadd -r uniworx
|
RUN groupadd -r uniworx
|
||||||
run useradd -r -g uniworx -d /var/lib/uniworx -M uniworx --uid 999
|
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 install -d -g uniworx -o uniworx -m 0750 /var/lib/uniworx
|
||||||
run mkdir -p /var/log
|
RUN mkdir -p /var/log
|
||||||
run install -d -g uniworx -o uniworx -m 0755 /var/log/uniworx
|
RUN install -d -g uniworx -o uniworx -m 0755 /var/log/uniworx
|
||||||
|
|
||||||
user uniworx
|
USER uniworx
|
||||||
|
|
||||||
entrypoint fradrive-entrypoint.sh
|
ENTRYPOINT fradrive-entrypoint.sh
|
||||||
expose 8080/tcp
|
EXPOSE 8080/tcp
|
||||||
volume /var/lib/uniworx /var/log
|
VOLUME /var/lib/uniworx /var/log
|
||||||
|
|||||||
Reference in New Issue
Block a user