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

Add v6 base image build #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ For RapidPro v3 builds use: `rapidpro/rapidpro-base:v3`

For RapidPro v4 builds use: `rapidpro/rapidpro-base:v4`

For RapidPro v6 builds use: `rapidpro/rapidpro-base:v6`

`rapidpro-base:latest` still points at v3 for backwards compatibility but consider it deprecated.
15 changes: 15 additions & 0 deletions v6/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.9-alpine

COPY stack/geolibs.sh /
RUN set -ex \
&& apk add --no-cache --virtual .build-deps \
gcc \
g++ \
make \
libc-dev \
musl-dev \
linux-headers \
&& sh /geolibs.sh \
&& apk del .build-deps

CMD ["python3"]
2 changes: 2 additions & 0 deletions v6/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This builds the image for RapidPro v6.
The images are built by hub.docker.com.
53 changes: 53 additions & 0 deletions v6/stack/geolibs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/sh

set -e # fail on any error


# Versions
# ===================================================================
GEOS_VERSION=3.4.3
PROJ_VERSION=4.9.3
PROJ_DATUMGRID_VERSION=1.5
GDAL_VERSION=1.11.5


# Install geos
# ===================================================================
cd /tmp
wget http://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2
tar xjf geos-${GEOS_VERSION}.tar.bz2
cd geos-${GEOS_VERSION}
./configure --enable-silent-rules CFLAGS="-D__sun -D__GNUC__" CXXFLAGS="-D__GNUC___ -D__sun"
make -s
make -s install


# Install proj
# ===================================================================
cd /tmp
wget http://download.osgeo.org/proj/proj-${PROJ_VERSION}.tar.gz
wget http://download.osgeo.org/proj/proj-datumgrid-${PROJ_DATUMGRID_VERSION}.tar.gz
tar xzf proj-${PROJ_VERSION}.tar.gz
cd proj-${PROJ_VERSION}/nad
tar xzf ../../proj-datumgrid-${PROJ_DATUMGRID_VERSION}.tar.gz
cd ..
./configure --enable-silent-rules
make -s
make -s install


# Install gdal
# ===================================================================
cd /tmp
wget http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz
tar xzf gdal-${GDAL_VERSION}.tar.gz
cd gdal-${GDAL_VERSION}
./configure --enable-silent-rules --with-static-proj4=/usr/local/lib
make -s
make -s install


# Clean up
# ===================================================================
rm -rf /tmp/*
rm -rf /root/.cache