-
Notifications
You must be signed in to change notification settings - Fork 791
/
Dockerfile
45 lines (34 loc) · 1.39 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
##
# OSGeo/PROJ
FROM ubuntu:22.04 AS builder
LABEL maintainer="Howard Butler <[email protected]>"
ARG DESTDIR="/build"
# Setup build env
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --fix-missing --no-install-recommends \
software-properties-common build-essential ca-certificates \
cmake wget unzip \
zlib1g-dev libsqlite3-dev sqlite3 libcurl4-gnutls-dev \
libtiff5-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
COPY . /PROJ
RUN cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -S /PROJ -B _build
RUN cmake --build _build -j $(nproc)
RUN cmake --install _build
RUN rm -rfv _build
FROM ubuntu:22.04 AS runner
RUN date
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
libsqlite3-0 libtiff5 libcurl4 libcurl3-gnutls \
wget ca-certificates \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Put this first as this is rarely changing
WORKDIR /usr/share/proj
RUN wget --no-verbose --mirror https://cdn.proj.org/ || true
RUN cd cdn.proj.org && rm -fv *.js *.css *.html favicon* && mv * .. && cd .. && rmdir cdn.proj.org
WORKDIR /
COPY --from=builder /build/usr/share/proj/ /usr/share/proj/
COPY --from=builder /build/usr/include/ /usr/include/
COPY --from=builder /build/usr/bin/ /usr/bin/
COPY --from=builder /build/usr/lib/ /usr/lib/