-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile_ubuntu22.04
40 lines (34 loc) · 1.66 KB
/
Dockerfile_ubuntu22.04
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
# to build
# docker build -f Dockerfile_ubuntu22.04 .
#
FROM ubuntu:22.04
ARG SDPA_GMP_VER="7.1.3"
RUN apt -y update
RUN apt -y upgrade
RUN apt install -y sudo
RUN apt install -y tzdata
# set your timezone
ENV TZ Asia/Tokyo
RUN echo "${TZ}" > /etc/timezone \
&& rm /etc/localtime \
&& ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime \
&& dpkg-reconfigure -f noninteractive tzdata
RUN apt install -y build-essential g++
RUN apt install -y autotools-dev automake libtool numdiff
RUN apt install -y git wget time
RUN apt install -y ng-common ng-cjk
ARG DOCKER_UID=1000
ARG DOCKER_USER=docker
ARG DOCKER_PASSWORD=docker
RUN useradd -u $DOCKER_UID -m $DOCKER_USER --shell /bin/bash && echo "$DOCKER_USER:$DOCKER_PASSWORD" | chpasswd && echo "$DOCKER_USER ALL=(ALL) ALL" >> /etc/sudoers
USER ${DOCKER_USER}
RUN cd /home/$DOCKER_USER && echo "cd /home/$DOCKER_USER" >> .bashrc
RUN cd /home/$DOCKER_USER && git clone https://github.com/nakatamaho/sdpa-gmp.git
RUN cd /home/$DOCKER_USER && cd sdpa-gmp; aclocal ; autoconf ; automake --add-missing ; ./configure ; make dist ; mv sdpa-gmp-${SDPA_GMP_VER}.tar.gz ~
RUN cd /home/$DOCKER_USER && rm -rf sdpa-gmp
RUN cd /home/$DOCKER_USER && mkdir /home/$DOCKER_USER/tmp
RUN cd /home/$DOCKER_USER/tmp && tar xvf ~/sdpa-gmp-${SDPA_GMP_VER}.tar.gz
RUN cd /home/$DOCKER_USER/tmp/sdpa-gmp-${SDPA_GMP_VER} && ./configure ; make
RUN cd /home/$DOCKER_USER/tmp/sdpa-gmp-${SDPA_GMP_VER} && ./sdpa_gmp -ds example1.dat-s -o example1.result
RUN cd /home/$DOCKER_USER && git clone https://github.com/nakatamaho/sdpa-gmp.git
#RUN cd /home/$DOCKER_USER && cd sdpa-gmp && numdiff example1.result /home/$DOCKER_USER/tmp/sdpa-gmp-${SDPA_GMP_VER}/example1.result