Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch alpine docker to alpine 3.11 and compiled pdal #84

Merged
merged 2 commits into from
Mar 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions docker/actinia-core-alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM mundialis/grass-py3-pdal:stable-alpine as grass
FROM mundialis/esa-snap:7.0 as snap
FROM mundialis/actinia-core:alpine-build-pkgs as build
FROM mundialis/esa-snap:7.0v1 as snap
FROM mundialis/actinia-core:alpine-build-pkgs_v2 as build

LABEL authors="Carmen Tawalika,Anika Bettge,Markus Neteler,Sören Gebbert"
LABEL maintainer="[email protected],[email protected],[email protected],[email protected]"
Expand All @@ -18,7 +18,7 @@ RUN python3 setup.py sdist bdist_wheel -d /build
# RUN python3 -m pep517.build --out-dir /build . && \


FROM mundialis/actinia-core:alpine-runtime-pkgs as actinia
FROM mundialis/actinia-core:alpine-runtime-pkgs_v2 as actinia

ENV LC_ALL "en_US.UTF-8"
ENV GDAL_CACHEMAX=2000
Expand Down Expand Up @@ -48,10 +48,6 @@ RUN grass --tmp-location EPSG:4326 --exec g.version -rge && \
# GRASS GIS addons BUILD
RUN git clone https://github.com/mundialis/openeo-addons.git /src/openeo-addons
COPY docker/grass_addons_list.csv /src/grass_addons_list.csv
# TODO: remove patch when python 3.8.2 is here
RUN apk add curl
RUN curl -L https://github.com/mmacata/alpine-python381-patch/releases/download/0.0.0/python3-3.8.1-r1.apk > /src/python3-3.8.1-r1.apk
RUN apk add --allow-untrusted /src/python3-3.8.1-r1.apk

RUN while IFS=, read -r ADDON SERVER; do unset URL; test -z $SERVER || URL="url=$SERVER"; grass --tmp-location EPSG:4326 --exec g.extension -s extension=$ADDON $URL;done < /src/grass_addons_list.csv

Expand Down
3 changes: 2 additions & 1 deletion docker/actinia-core-alpine/Dockerfile_build_pkgs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:edge
FROM alpine:3.11

ENV BUILD_PACKAGES="\
gcc \
Expand All @@ -23,4 +23,5 @@ ENV REQUIREMENTS_WHEEL_PACKAGES="\
"

RUN apk update && apk add $BUILD_PACKAGES $REQUIREMENTS_WHEEL_PACKAGES
RUN python3 -m ensurepip && pip3 install --upgrade pip
RUN pip3 install --upgrade pip pep517 wheel
44 changes: 37 additions & 7 deletions docker/actinia-core-alpine/Dockerfile_runtime_pkgs
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
#FROM mundialis/actinia-core:alpine-build-pkgs
FROM actinia-core:alpine-build-pkgs
FROM mundialis/docker-pdal:1.8.0 as pdal
FROM mundialis/actinia-core:alpine-build-pkgs_v2

ENV SNAPPY_RUNTIME_PACKAGES="\
python3 \
openjdk8 \
# openjdk8 \
"

ENV PDAL_RUNTIME_PACKAGES="\
curl \
jsoncpp \
libexecinfo \
libunwind \
gdal \
geos \
libxml2 \
postgresql \
python3 \
py3-numpy sqlite \
"

# Keep basic packages for simple debugging
ENV GRASS_RUNTIME_BASIC_PACKAGES="gdal python3 zstd-libs"
ENV GRASS_RUNTIME_ALPINE_TESTING_REPO_PACKAGES="pdal"
ENV GRASS_RUNTIME_PACKAGES="\
cairo \
fftw \
Expand Down Expand Up @@ -50,15 +62,33 @@ ENV ACTINIA_PLUGIN_INSTALL_PACKAGES="\
"

RUN apk update; \
apk add --no-cache \
--repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
$GRASS_RUNTIME_ALPINE_TESTING_REPO_PACKAGES; \
apk add --no-cache \
$SNAPPY_RUNTIME_PACKAGES \
$PDAL_RUNTIME_PACKAGES \
$GRASS_RUNTIME_PACKAGES \
$GRASS_ADDONS_BUILD_PACKAGES \
$ACTINIA_PLUGIN_INSTALL_PACKAGES

COPY --from=pdal /usr/bin/pdal* /usr/bin/
COPY --from=pdal /usr/lib/pdal /usr/lib/pdal
COPY --from=pdal /usr/lib/libpdal* /usr/lib/
COPY --from=pdal /usr/lib/pkgconfig/pdal.pc /usr/lib/pkgconfig/pdal.pc
COPY --from=pdal /usr/include/pdal /usr/include/pdal
COPY --from=pdal /usr/local/lib/liblaszip* /usr/local/lib/
COPY --from=pdal /usr/local/include/laszip /usr/local/include/laszip

ARG OPENJDK_VERSION=8.232.09-r0
ARG OPENJDK_PKGS_URL=https://github.com/mmacata/alpine-openjdk8/releases/download/$OPENJDK_VERSION
RUN curl -L $OPENJDK_PKGS_URL/openjdk8-$OPENJDK_VERSION.apk > openjdk8-$OPENJDK_VERSION.apk
RUN curl -L $OPENJDK_PKGS_URL/openjdk8-jre-$OPENJDK_VERSION.apk > openjdk8-jre-$OPENJDK_VERSION.apk
RUN curl -L $OPENJDK_PKGS_URL/openjdk8-jre-base-$OPENJDK_VERSION.apk > openjdk8-jre-base-$OPENJDK_VERSION.apk
RUN curl -L $OPENJDK_PKGS_URL/openjdk8-jre-lib-$OPENJDK_VERSION.apk > openjdk8-jre-lib-$OPENJDK_VERSION.apk
RUN apk add --allow-untrusted \
openjdk8-jre-lib-$OPENJDK_VERSION.apk \
openjdk8-$OPENJDK_VERSION.apk \
openjdk8-jre-base-$OPENJDK_VERSION.apk \
openjdk8-jre-$OPENJDK_VERSION.apk

# Duplicated in final images, only here to safe time
COPY requirements-alpine.txt /src/requirements-alpine.txt
RUN pip3 install -r /src/requirements-alpine.txt
13 changes: 8 additions & 5 deletions docker/actinia-core-alpine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,22 @@ __Build with__:

```bash
$ docker build \
--no-cache \
--file docker/actinia-core-alpine/Dockerfile_build_pkgs \
--tag actinia-core:alpine-build-pkgs .
$ docker tag actinia-core:alpine-build-pkgs mundialis/actinia-core:alpine-build-pkgs
$ docker push mundialis/actinia-core:alpine-build-pkgs
$ docker tag actinia-core:alpine-build-pkgs mundialis/actinia-core:alpine-build-pkgs_v2
$ docker push mundialis/actinia-core:alpine-build-pkgs_v2

$ docker build \
--no-cache \
--file docker/actinia-core-alpine/Dockerfile_runtime_pkgs \
--tag actinia-core:alpine-runtime-pkgs .
$ docker tag actinia-core:alpine-runtime-pkgs mundialis/actinia-core:alpine-runtime-pkgs
$ docker push mundialis/actinia-core:alpine-runtime-pkgs
$ docker tag actinia-core:alpine-runtime-pkgs mundialis/actinia-core:alpine-runtime-pkgs_v2
$ docker push mundialis/actinia-core:alpine-runtime-pkgs_v2

$ docker build \
--no-cache \
--file docker/actinia-core-alpine/Dockerfile \
--tag actinia-core:stable-alpine-final .
--tag actinia-core:g78-stable-alpine .

```