forked from DSSAT/dssat-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (22 loc) · 654 Bytes
/
Dockerfile
File metadata and controls
26 lines (22 loc) · 654 Bytes
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
FROM debian:stable-slim as build
ARG DSSAT_GIT_REPO=https://github.com/DSSAT/dssat-csm-os.git
ARG DSSAT_GIT_TAG=HEAD
# Install deps and update OS
RUN apt-get update
RUN apt-get install -y git ca-certificates gfortran cmake
# Checkout code
WORKDIR /dssat-csm-os
RUN git clone "${DSSAT_GIT_REPO}" .
RUN git checkout "${DSSAT_GIT_TAG}"
# Compile
RUN mkdir build
WORKDIR /dssat-csm-os/build
RUN cmake -DCMAKE_INSTALL_PREFIX=/opt/dssat ..
RUN make
RUN make install
FROM debian:stable-slim
ENV DSSAT_HOME=/opt/dssat/
COPY --from=build /opt/dssat /opt/dssat/
RUN ln -s /opt/dssat/dscsm048 /usr/local/bin/dscsm048
WORKDIR /data/dssat
ENTRYPOINT ["dscsm048"]