-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile.Arch
36 lines (29 loc) · 870 Bytes
/
Dockerfile.Arch
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
FROM archlinux:base-devel
# initialize
RUN pacman -Sy go git --noconfirm
# set user
RUN useradd -G wheel -m user
RUN echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
RUN chown -R user:wheel /usr/local/src/
USER user
WORKDIR /usr/local/src/
# install yay
RUN git clone https://aur.archlinux.org/yay.git
RUN cd yay && makepkg -si --noconfirm
RUN sudo rm -f \
/var/cache/pacman/pkg/* \
/var/lib/pacman/sync/* \
/README \
/etc/pacman.d/mirrorlist.pacnew
# install libraries for russell
RUN yay -Y --gendb --noconfirm && yay -Y --devel --save
RUN yay -Syu blas-openblas --noconfirm
RUN yay -Syu suitesparse --noconfirm
# install rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
ENV PATH="/home/user/.cargo/bin:${PATH}"
# copy files
COPY --chown=user:user . russell
WORKDIR russell
# run tests
RUN cargo test