-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (36 loc) · 1.65 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
FROM archlinux:latest
LABEL author="Duc A. Hoang"
ARG USERNAME=sage
ARG USERHOME=/home/sage
ARG USERID=1000
ARG USERGECOS='SageMath'
RUN useradd \
--create-home \
--home-dir "$USERHOME" \
--password "" \
--uid "$USERID" \
--comment "$USERGECOS" \
--shell /bin/bash \
"$USERNAME" && \
echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Set locale
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN pacman -Syy && \
pacman -S --noconfirm --needed arb bc binutils boost brial cblas cddlib eclib fflas-ffpack flintqs gc gcc gcc gcc-fortran gd gf2x gfan giac glpk gsl iml lapack lcalc libatomic_ops libbraiding libgiac lrcalc m4 m4ri m4rie make nauty openblas palp pari pari-elldata pari-galdata pari-galdata pari-galpol pari-seadata pari-seadata patch perl planarity ppl python r rankwidth readline sqlite3 suitesparse symmetrica sympow tachyon tar which zn_poly && \
pacman -S --noconfirm --needed boost coin-or-cbc coxeter ninja openssl pandoc pari-elldata pari-galpol pari-seadata perl-term-readline-gnu && \
pacman -S --noconfirm --needed base base-devel python perl ffmpeg imagemagick texlive-core texlive-bin texlive-fontsextra openssh git curl wget sudo && \
yes | pacman -Scc
USER $USERNAME
WORKDIR $USERHOME
RUN git clone -c core.symlinks=true --branch master git://trac.sagemath.org/sage.git
RUN cd sage && \
make configure && \
./configure && \
make build && \
./config.status --recheck && ./config.status && \
sudo ln -s /home/sage/sage /usr/local/bin/sage && \
mkdir $HOME/.sage && echo "%colors linux" >> $HOME/.sage/init.sage