https://github.com/nevrome/docker_postgres838_postgis135
Docker image for PostgreSQL 8.3.8 with PostGIS 1.3.5
https://github.com/nevrome/docker_postgres838_postgis135
docker postgis postgresql
Last synced: about 2 months ago
JSON representation
Docker image for PostgreSQL 8.3.8 with PostGIS 1.3.5
- Host: GitHub
- URL: https://github.com/nevrome/docker_postgres838_postgis135
- Owner: nevrome
- License: unlicense
- Created: 2018-02-01T09:39:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-25T14:58:44.000Z (about 8 years ago)
- Last Synced: 2025-02-28T11:29:40.187Z (over 1 year ago)
- Topics: docker, postgis, postgresql
- Language: Shell
- Homepage: https://hub.docker.com/r/nevrome/docker_postgres838_postgis135/
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Docker image for PostgreSQL 8.3.8 with PostGIS 1.3.5
This image is very simple. It's not intended for new projects. Please use the [official postgres images](https://hub.docker.com/_/postgres/) or -- if you need postgis -- an up-to-date and well prepared implementation like the one from [mdillon](https://hub.docker.com/r/mdillon/postgis/).
The abomination in this repository creates a badly crafted docker container with terribly outdated software (Ubuntu 12.04, PostgreSQL 8.3.8, PostGIS 1.3.5, etc.). I created it to deal with very old PostGIS enabled Postgres databases. In my usecase the work necessary to port the databases to new versions would be disproportionately high. I therefore decided to craft this container with the old environment. I share it here to provide people in the same situation with a fast solution.
## Pull image from dockerhub and run container
```
docker run \
-e POSTGRES_USER="docker" \
-e POSTGRES_PASSWORD="'docker'" \
-p 5432:5432 \
--name pgres8 \
-dit nevrome/docker_postgres838_postgis135 /bin/bash
```
## Build image and run container from scratch
```
docker build -t docker_postgres838_postgis135 .
docker run \
-e POSTGRES_USER="docker" \
-e POSTGRES_PASSWORD="'docker'" \
-p 5432:5432 \
--name pgres8 \
-dit docker_postgres838_postgis135 /bin/bash
```
## Enable postgis for individual databases
See [here](http://www.postgis.org/download/postgis-1.3.5.pdf) for reference.
```
docker exec -it pgres8 /bin/bash
```
```
su postgres
createlang plpgsql [yourdatabase]
psql -d [yourdatabase] -U [youruser] -f /usr/local/pgsql/share/lwpostgis.sql
psql -d [yourdatabase] -U [youruser] -f /usr/local/pgsql/share/spatial_ref_sys.sql
```