-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
101 lines (86 loc) · 2.54 KB
/
Copy pathDockerfile
File metadata and controls
101 lines (86 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
FROM debian:trixie-20260623
RUN apt-get update && apt-get install -y \
# LaTeX packages for IEEE and EGU journals
texlive-base \
texlive-latex-recommended \
texlive-latex-extra \
texlive-publishers \
texlive-science \
texlive-fonts-recommended \
texlive-bibtex-extra \
texlive-lang-other \
texlive-fonts-extra \
biber \
# some auxiliary tools
wget \
curl \
git \
adduser \
openssh-client \
make \
pandoc \
fig2dev \
ripgrep \
fd-find \
hunspell \
nodejs \
npm \
chktex \
fzf \
bat \
btop \
zoxide \
eza \
default-jre-headless \
locales && \
# Removing documentation packages *after* installing them is kind of hacky,
# but it only adds some overhead while building the image.
apt-get --purge remove -y '.*-doc' && \
# Remove more unnecessary stuff
apt-get clean -y
ARG USER_NAME=vscode
ARG USER_HOME=/home/vscode
ARG USER_ID=1000
ARG USER_GECOS=vscode
RUN adduser \
--home "$USER_HOME" \
--uid $USER_ID \
--gecos "$USER_GECOS" \
--disabled-password \
"$USER_NAME"
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# Configure shell for vscode user
RUN echo '\
RESET="\\[\\e[0m\\]"\n\
BOLD="\\[\\e[1m\\]"\n\
GREEN="\\[\\e[32m\\]"\n\
BLUE="\\[\\e[34m\\]"\n\
export PS1="${BLUE}vscode ${BLUE}${BOLD}\\w${RESET} $ "\n\
eval "$(dircolors -b)"\n\
eval "$(zoxide init bash)"\n\
alias ls="eza --group-directories-first"\n\
alias ll="eza -lh --group-directories-first"\n\
alias la="eza -lah --group-directories-first"\n\
alias cat="batcat"\n\
# Auto-completion for fzf\n\
source /usr/share/doc/fzf/examples/key-bindings.bash\n\
source /usr/share/doc/fzf/examples/completion.bash\n\
' | tee -a /root/.bashrc >> "$USER_HOME/.bashrc"
# Install uv for both root and vscode user
RUN wget -qO- https://astral.sh/uv/install.sh | sh && \
su - "$USER_NAME" -c 'wget -qO- https://astral.sh/uv/install.sh | sh'
# install latest just
RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin/
# Install prek precommit hook
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/download/v0.4.5/prek-installer.sh | sh
# install bibtex-tidy
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends npm && \
/usr/bin/npm install -g bibtex-tidy
# install doi2bib and bibtui
RUN /root/.local/bin/uv tool install doi2bib && \
/root/.local/bin/uv tool install --prerelease=allow bibtui