Skip to content

Commit f5abae1

Browse files
committed
use nvm inspired docker file commands
1 parent aa37e44 commit f5abae1

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

base/Dockerfile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
FROM debian:bookworm-slim
22

3+
# Use bash for the shell
4+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
5+
6+
# Create a script file sourced by both interactive and non-interactive bash shells
7+
ENV BASH_ENV=/root/.bash_env
8+
RUN touch "${BASH_ENV}"
9+
RUN echo '. "${BASH_ENV}"' >> ~/.bashrc
10+
311
RUN apt-get update \
412
&& apt-get install -y --no-install-recommends \
513
python3 \
@@ -30,9 +38,9 @@ RUN apt-get update \
3038
ca-certificates \
3139
gcc \
3240
build-essential \
33-
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash \
34-
&& \. "$HOME/.nvm/nvm.sh" \
35-
&& nvm install 24 \
41+
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | PROFILE="${BASH_ENV}" bash \
42+
&& echo node > .nvmrc \
43+
&& nvm install \
3644
&& pip install pip --upgrade --no-cache-dir \
3745
&& pip install pretext[all] codechat-server --prefer-binary --no-cache-dir \
3846
&& prefig init \
@@ -74,8 +82,6 @@ RUN wget -O TinyTex.sh "https://yihui.org/tinytex/install-bin-unix.sh" \
7482
#TinyTeX installs links to the executable in /root/bin, so we need to add that to the PATH
7583
ENV PATH="/root/bin:$PATH"
7684

77-
SHELL ["/bin/bash", "-i", "-c"]
78-
7985
RUN tlmgr install adjustbox amscdx bold-extra braket bussproofs cancel carlisle cases chessfss circuitikz colortbl enumitem extpfeil fontawesome5 fontaxes gensymb hobby imakeidx jknapltx kastrup lambda-lists listings listingsutf8 makeindex marvosym mathalpha mathtools menukeys mhchem microtype musicography newpx newtx nicematrix pdfcol pdfpages pdflscape pgfplots phaistos physics polyglossia pstricks realscripts relsize siunitx skak skaknew smartdiagram snapshot stmaryrd tcolorbox tikz-3dplot tikz-cd tikzfill titlesec txfonts ulem upquote was xfrac xltxtra xpatch xstring \
8086
&& tlmgr path add
8187

0 commit comments

Comments
 (0)