Closed zachsa closed 3 years ago
That's correct, in order to keep the image size small, not everything is installed. Currently the possibility of maintaining multiple variants of the image are being explored, where some variants would be geared toward scaling out production environments while others would be better for development and testing environments. The former benefits from smaller image sizes while the later can afford to have more utilities preinstalled for convenience.
Okay thanks.
It's quite easy to extend this docker image with my own dockerfile, and I think it would make more sense to provide an example of how to do this rather than provide more images to choose from.
I agree 100% and acknowledge that the documentation definitely needs to improve in multiple areas. If you think you could help with this, all pull requests are welcome 😉
I would suggest an examples
folder somewhere. Each example is a directory that contains a Dockerfile and a README.md file.
For example, there could be:
https://github.com/postgis/docker-postgis/tree/master/13-master/examples/
- README.md (with instructions on simple usage)
- /with-raster2pgsql-cli
- Dockerfile
- README.md
- /with-other-cli
- Dockerfile
- README.md
- /etc
If you like this idea let me know and I will implement it.
@zachsa that sounds great 👍
Something to be aware of: The postges image in the Docker Official Images contains information about extending the postgres image itself. They've actually put links to this docker-postgis repo there, so it might be fine to piggyback off of their documentation and probably a good idea to avoid duplicating concepts they already cover there. In some cases we've had folks create issues here with questions that were already answered by the postgres image's docs.
Okay, thanks. I just had a quick look at the link and didn't see anything immediately obvious to me that I would need to consider. My intention is to create an EXTREMELY basic Dockerfile with the CLI's enabled as an example. This is actually useful since it looks like some people who use this image get stuck trying to use the CLIs with the basic image.
Please let me know if this is on the right track @phillipross. I use these tools (Docker, PostGIS, etc.) in quite a simple way, so my ability to do more complex work on this is limited.
@zachsa Thanks for PR!
Hi,
Running the
13-3.1
Docker image:I see that it's necessary to enable extensions. Running
create extension
SQL on the databasemydb
enables the extensions successfully (I think at least):The
\dx
commands shows that these extensions are installed and enabled:But trying to run the
raster2pgsql
command, it doesn't seems to exist:Looking inside the container
I can't find the
raster2pgsql
installation. I've looked in a few places including/usr/bin
,/usr/lib/postgresql/13/**/*
, and a couple other places.Once in the container I can install PostGIS manually:
And now I have access to these tools.
Is this intended?
It seems strange that I should have to install PostGIS into a Docker container that is created from a PostGIS image. This is likely also the reason for this question - https://github.com/postgis/docker-postgis/issues/222 , and is possibly related to https://github.com/postgis/docker-postgis/issues/191