[postgis-devel] Docker and Lightweight Libraries

Regina Obe lr at pcorp.us
Fri May 10 14:20:17 PDT 2019


We had this on our todo for 3.0 (thought can't find the ticket at moment) to not require same dependencies as postgis for the command line tools.  I think we resolved some but not all to make this a reality and to allow configure to just build the commandline tools.

 

That said when we are done with that what we can in theory have in a perfect scenario

 

For reference see - https://trac.osgeo.org/postgis/ticket/4260

 

shp2pgsql  -> relies on nothing (possibly liblwgeom though) – I'd like to just make that static and not sure we got to that point.  It just outputs an sql script so has no need for libpq or anthing PostgreSQLy

 

pgsql2shp -> relies on liblwgeom (in theory any geos/proj stuff needed would be done in the SQL calls so no need to have the commandline need those.) / libpq 

raster2pgsql -> gdal, liblwgeom (?) again this makes no interaction with PostgreSQL as I recall, just spits out an sql script that is normally piped to psql.

 

I think prior versions had some unnecessary includes in the files for these that brought in unnecessary dependencies.

 

Hope that helps,

Regina

 

From: postgis-devel [mailto:postgis-devel-bounces at lists.osgeo.org] On Behalf Of Adam Dadvar
Sent: Friday, May 10, 2019 7:38 AM
To: PostGIS Development Discussion <postgis-devel at lists.osgeo.org>
Subject: Re: [postgis-devel] Docker and Lightweight Libraries

 

Hi,

 

"We build images for CI  where we build all the dependencies but

postgis (https://cloud.docker.com/u/postgis/repository/docker/postgis/postgis-build-env)
but not for distribution." 

 

Makes sense to use it for CI, again was mostly just wondering about distribution, would be good to get people's thoughts on setting one up.

 

 

"I'm not sure what bash scripts you are refering too, but this looks
like a packaging request/issue."

 

Sorry, I should have been more clear.

The bash script I'm referring to is shp2pgsql, I left it plural because I wasn't sure if there are any other PostGIS commands that are executable from the terminal.

This is more a packaging request yes. I'll admit I'm not sure on the dependencies within PostGIS, so it may be that even just for shp2pgsql requires a lot of these dependencies, just wanted to float the idea and if we can foresee a large amount of disk savings then maybe it is worth the effort.

 

"One note, the packages I build locally
including everything (binaries and libraries with full debug symbols,
update scripts...) take ~43MB so something looks suspicious in your
300MB library." 

 

The 300MB footprint I'm talking about is the fact that if I remove PostGIS from my machine (Fedora 29 with postgreSQL client only) I get 360MB of freed space:

 

$ dnf remove postgis

Transaction Summary

======================

Remove  33 Packages

 

Freed space: 360 M

Is this ok [y/N]:

 

Obviously this is mostly from the other libraries, but I was just wondering if there was any way that a smaller client-only version could be created.

 

Regards,

Adam

 

 

On Fri, 10 May 2019 at 11:56, Raúl Marín Rodríguez <rmrodriguez at carto.com <mailto:rmrodriguez at carto.com> > wrote:

Hi,

> Have been playing around with Docker a lot recently and was wondering if there was any reason why there is no official PostGIS Docker repository that builds on the PostgreSQL image?

We build images for CI  where we build all the dependencies but
postgis (https://cloud.docker.com/u/postgis/repository/docker/postgis/postgis-build-env)
but not for distribution.

> While we're on the subject of Docker and containers, I thought I'd ask if there is any scope for a lightweight PostGIS library that only has the bash scripts in it? A sort of "postgis-client" type of thing, that allows you to interact with remote databases running PostGIS without having to install the entire 300MB library yourself.

I'm not sure what bash scripts you are refering too, but this looks
like a packaging request/issue. One note, the packages I build locally
including everything (binaries and libraries with full debug symbols,
update scripts...) take ~43MB so something looks suspicious in your
300MB library.

Regards
-- 
Raúl Marín Rodríguez
carto.com <http://carto.com> 
_______________________________________________
postgis-devel mailing list
postgis-devel at lists.osgeo.org <mailto:postgis-devel at lists.osgeo.org> 
https://lists.osgeo.org/mailman/listinfo/postgis-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20190510/0b5abc5b/attachment.html>


More information about the postgis-devel mailing list