forked from BerriJ/devenv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
70 lines (54 loc) · 1.82 KB
/
Dockerfile
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
FROM ubuntu:focal
SHELL ["/bin/bash", "-c"]
ENV R_VERSION 4.0.2
ENV R_REPOS https://packagemanager.rstudio.com/all/__linux__/focal/311
ENV DISPLAY :0
ENV TZ Europe/Berlin
ARG DEBIAN_FRONTEND=noninteractive
COPY package_lists /package_lists
COPY install_scripts /install_scripts
# Ubuntu Setup
RUN apt-get -y update &&\
apt-get -y --no-install-recommends install \
software-properties-common \
git \
zsh \
gnupg2 \
ssh-client \
locales &&\
locale-gen en_US.UTF-8 &&\
export LC_ALL=en_US.UTF-8 &&\
export LANG=en_US.UTF-8 &&\
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &&\
# Cleanup apt cache
rm -rf /var/lib/apt/lists/*
# Install Python
RUN apt-get -y update &&\
apt-get -y --no-install-recommends install python3-pip && \
# Cleanup apt cache
rm -rf /var/lib/apt/lists/*
# Python packages
RUN pip3 install -U --no-cache-dir\
$(grep -o '^[^#]*' package_lists/python_packages.txt | tr '\n' ' ')
# Install R
RUN chmod +x /install_scripts/install_r.sh &&\
/install_scripts/install_r.sh
# R packages on CRAN / RSPM
RUN install2.r -error --ncpus 16 --repos $R_REPOS \
$(grep -o '^[^#]*' package_lists/r_packages.txt | tr '\n' ' ')
# R packages on Github
RUN installGithub.r \
$(grep -o '^[^#]*' package_lists/r_packages_github.txt | tr '\n' ' ')
# Install Latex
RUN chmod +x /install_scripts/install_latex.sh &&\
/install_scripts/install_latex.sh
# Set Latex Path
ENV PATH="/usr/local/texlive/bin/x86_64-linux:${PATH}"
# Install latex packages
RUN tlmgr install \
$(grep -o '^[^#]*' package_lists/latex_packages.txt | tr '\n' ' ')
# Set the default shell to zsh rather than bash
RUN mkdir -p "$HOME/.zsh" &&\
git clone https://github.com/sindresorhus/pure.git "$HOME/.zsh/pure"
COPY .misc/.zshrc /root/.
ENTRYPOINT [ "/bin/zsh" ]