-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
37 lines (29 loc) · 1.12 KB
/
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
37
FROM ubuntu:22.04 AS builder
ENV SNAP_FIMEX_VERSION=1.9
RUN apt-get update -y && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:met-norway/fimex && \
apt-get update -y && \
apt-get install -y libnetcdff-dev gfortran libfimex-$SNAP_FIMEX_VERSION-dev make && \
apt-get remove -y software-properties-common && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/*
WORKDIR /snap
ARG VERSION="latest"
ADD src .
RUN ln --symbolic --force gcc_pkgconfig.mk current.mk
ENV SNAP_USE_OMP=1
RUN make clean && make
FROM ubuntu:22.04
ENV SNAP_FIMEX_VERSION=1.9
RUN apt-get update -y && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:met-norway/fimex && \
apt-get update -y && \
apt-get install -y libnetcdff7 libfimex-$SNAP_FIMEX_VERSION-0 tini && \
apt-get remove -y software-properties-common && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/*
WORKDIR /snap
COPY --from=builder /snap/naccident/bsnap_naccident /snap/bsnap
ENTRYPOINT ["/usr/bin/env", "TINI_VERBOSITY=0", "/usr/bin/tini", "-g", "--", "/snap/bsnap"]