-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
56 lines (47 loc) · 1.06 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# -*- coding:utf-8 -*-
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
# GitHub: https://github.com/btschwertfeger
#
FROM alpine:3.17 AS builder
# hadolint ignore=DL3018
RUN apk add --update --no-cache \
linux-headers \
libc-dev \
libaec-dev \
netcdf-dev \
hdf5-dev \
curl-dev \
g++ \
build-base \
cmake \
git \
rm -rf /var/cache/apk/*
# Install netcdf-cxx4
WORKDIR /netcdf-cxx4
# hadolint ignore=DL3003
RUN git clone https://github.com/Unidata/netcdf-cxx4.git /netcdf-cxx4 \
&& cmake -S . -B build \
&& cmake --build build \
&& cd build \
&& ctest \
&& make install
# Install BiasAdjustCXX
COPY . /BiasAdjustCXX/
WORKDIR /BiasAdjustCXX
RUN rm -rf build \
&& make dev \
&& make test \
&& make clean \
&& make build \
&& make install
# ===== N E X T - S T A G E ======
FROM alpine:3.17
# hadolint ignore=DL3018
RUN apk add --update --no-cache \
libc-dev \
libaec-dev \
netcdf-dev \
hdf5-dev \
rm -rf /var/cache/apk/*
COPY --from=builder /usr/local/ /usr/local/
WORKDIR /work