forked from OSGeo/PROJ
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.alpine
56 lines (42 loc) · 1.35 KB
/
Dockerfile.alpine
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
ARG JDK_TAG=8-jdk-alpine
ARG JRE_TAG=${JDK_TAG}
FROM openjdk:${JDK_TAG} as builder
MAINTAINER David Raleigh <david@echoparklabs.io>
# ODO update horizontal datum support as described in travis scripts
# Install Proj4
# https://github.com/OSGeo/proj.4/blob/57a07c119ae08945caa92b29c4b427b57f1f728d/Dockerfile
# Setup build env
RUN mkdir /build
RUN apk update && \
apk add git && \
apk add automake && \
apk add autoconf && \
apk add libtool && \
apk add build-base && \
apk add make && \
apk add wget && \
apk add apache-ant
RUN export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
#TODO there should be a release checkout
WORKDIR /opt/src/proj.4
COPY ./ ./
RUN ./autogen.sh && \
CFLAGS=-I$JAVA_HOME/include/linux ./configure --with-jni=$JAVA_HOME/include --prefix=/usr/local && \
make -j 8 && \
make install && \
cd jniwrap && \
ant && \
mv /opt/src/proj.4/jniwrap/out/proj.jar /usr/local/lib/
WORKDIR /usr/local/share/proj
ARG FETCH_VERT=0
ENV VERT_DATUM=$FETCH_VERT
RUN /opt/src/proj.4/datum-installs.sh $FETCH_VERT
ENV PROJ_LIB=/usr/local/share/proj
WORKDIR /opt/src/proj.4
FROM openjdk:${JRE_TAG}
RUN apk update
WORKDIR /usr/local
COPY --from=builder /usr/local .
RUN export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
ENV PROJ_LIB=/usr/local/share/proj
#RUN /sbin/ldconfig