forked from CH-Earth/summa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (30 loc) · 868 Bytes
/
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
FROM ubuntu:xenial
# install only the packages that are needed
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common python-software-properties \
ca-certificates \
git \
make \
libnetcdff-dev \
liblapack-dev \
vim
# install gfortran-6
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y \
&& apt-get update \
&& apt-get install -y --no-install-recommends gfortran-6 \
&& apt-get clean
# set environment variables for docker build
ENV F_MASTER /code
ENV FC gfortran
ENV FC_EXE gfortran
ENV INCLUDES -I/usr/include
ENV LIBRARIES '-L/usr/lib -lnetcdff -llapack -lblas'
# add code directory
WORKDIR /code
ADD . /code
# fetch tags and build summa
RUN git fetch --tags && make -C build/ -f Makefile
# run summa when running the docker image
WORKDIR bin
ENTRYPOINT ["./summa.exe"]