-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.ubuntu
47 lines (35 loc) · 1.35 KB
/
Dockerfile.ubuntu
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
FROM ubuntu:latest
WORKDIR workdir
RUN apt-get update -y
RUN apt-get install -y vim
## syntran crashes almost immediately with gfortran 13
#ARG GFORT_VERS="12"
ARG GFORT_VERS="13"
#RUN apt-get install -y gfortran
RUN apt-get install -y gfortran-${GFORT_VERS}
RUN cp $(which "gfortran-${GFORT_VERS}") /usr/bin/gfortran
#RUN apt-get install -y curl
RUN gfortran-${GFORT_VERS} --version
COPY src ./src
COPY fpm.toml .
ADD https://github.com/fortran-lang/fpm/releases/download/current/fpm-linux-x86_64 ./fpm
#RUN curl -LO https://github.com/fortran-lang/fpm/releases/download/current/fpm-linux-x86_64
#RUN curl -LO https://github.com/fortran-lang/fpm/releases/download/v0.10.1/fpm-0.10.1-linux-x86_64
#RUN mv fpm-*linux-x86_64 fpm
RUN chmod +x fpm
RUN mv fpm /usr/local/bin
RUN fpm --version
RUN yes | fpm clean
RUN fpm build --compiler gfortran-${GFORT_VERS}
#RUN fpm test test --compiler gfortran-${GFORT_VERS}
##RUN fpm test long --compiler gfortran-${GFORT_VERS}
#
##ARG PROFILE release
#ARG PROFILE debug
#
##RUN fpm build --compiler gfortran-${GFORT_VERS} --profile "$PROFILE" --link-flag "-static-libgcc -static-libgfortran -static-libquadmath"
#
#RUN fpm build --compiler gfortran-${GFORT_VERS} --profile "$PROFILE" --link-flag "-static-libgcc -static-libgfortran -Wl,-Bstatic -lquadmath -Wl,-Bdynamic"
#
#RUN find ./build -wholename "*app/syntran" | xargs ls -ltrh
#