From 57f7fec9a0bc17a8dd1fd5ff3e3fb0ec4198e55b Mon Sep 17 00:00:00 2001 From: Andreas Tsouchlos Date: Sun, 7 Jan 2024 22:19:52 +0100 Subject: [PATCH] Spoof home directory in dockerfiles to be able to build with package bbm --- dockerfiles/Dockerfile.alpine | 8 ++++++++ dockerfiles/Dockerfile.archlinux | 8 ++++++++ dockerfiles/Dockerfile.ubuntu | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/dockerfiles/Dockerfile.alpine b/dockerfiles/Dockerfile.alpine index 3f5d0f8..04eaf0c 100644 --- a/dockerfiles/Dockerfile.alpine +++ b/dockerfiles/Dockerfile.alpine @@ -3,3 +3,11 @@ FROM alpine:3.19 RUN apk update && apk upgrade RUN apk add make texlive texmf-dist-pictures RUN apk add texmf-dist-publishers texmf-dist-science texmf-dist-fontsextra texmf-dist-latexextra + +# The 'bbm' package insists on generating stuff in the home directory. In +# order to guarantee access to the home directory no matter the user the +# docker container is run with, create a temporary one anyone can write to +RUN mkdir /tmp/home +RUN chmod -R 777 /tmp/home +ENV HOME=/tmp/home + diff --git a/dockerfiles/Dockerfile.archlinux b/dockerfiles/Dockerfile.archlinux index a505bd6..e2c6258 100644 --- a/dockerfiles/Dockerfile.archlinux +++ b/dockerfiles/Dockerfile.archlinux @@ -7,3 +7,11 @@ RUN pacman -Sy archlinux-keyring --noconfirm && pacman -Su --noconfirm RUN pacman -Syu --noconfirm RUN pacman -S make perl texlive texlive-binextra texlive-pictures --noconfirm RUN pacman -S texlive-publishers texlive-mathscience texlive-fontsextra texlive-latexextra --noconfirm + +# The 'bbm' package insists on generating stuff in the home directory. In +# order to guarantee access to the home directory no matter the user the +# docker container is run with, create a temporary one anyone can write to +RUN mkdir /tmp/home +RUN chmod -R 777 /tmp/home +ENV HOME=/tmp/home + diff --git a/dockerfiles/Dockerfile.ubuntu b/dockerfiles/Dockerfile.ubuntu index 59919f6..3f49621 100644 --- a/dockerfiles/Dockerfile.ubuntu +++ b/dockerfiles/Dockerfile.ubuntu @@ -5,3 +5,11 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt update -y && apt upgrade -y RUN apt install make texlive latexmk texlive-pictures -y RUN apt install make texlive-publishers texlive-science texlive-fonts-extra texlive-latex-extra -y + +# The 'bbm' package insists on generating stuff in the home directory. In +# order to guarantee access to the home directory no matter the user the +# docker container is run with, create a temporary one anyone can write to +RUN mkdir /tmp/home +RUN chmod -R 777 /tmp/home +ENV HOME=/tmp/home +