forked from mundialis/esa-snap
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
50 lines (40 loc) · 1.11 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
FROM alpine:edge as build
LABEL authors="Carmen Tawalika,Markus Neteler"
LABEL maintainer="[email protected],[email protected]"
USER root
ENV BUILD_PACKAGES="\
gawk \
gcc \
git \
maven \
musl-dev \
python3-dev \
wget \
"
ENV PACKAGES="\
fontconfig \
openjdk8 \
python3 \
vim \
ttf-dejavu \
zip \
"
RUN echo "Install dependencies and tools";\
apk update; \
apk add --no-cache --virtual .build-deps $BUILD_PACKAGES; \
apk add --no-cache $PACKAGES; \
echo "Install step done"
ENV LC_ALL "en_US.UTF-8"
# SNAP wants the current folder '.' included in LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH ".:$LD_LIBRARY_PATH"
# install SNAPPY
ENV JAVA_HOME "/usr/lib/jvm/java-1.8-openjdk"
COPY snap /src/snap
RUN sh /src/snap/install.sh
FROM alpine:edge
RUN apk add openjdk8 python3
ENV LD_LIBRARY_PATH ".:$LD_LIBRARY_PATH"
COPY --from=build /root/.snap /root/.snap
COPY --from=build /usr/local/snap /usr/local/snap
RUN (cd /root/.snap/snap-python/snappy && python3 setup.py install)
RUN /usr/bin/python3 -c 'from snappy import ProductIO'