Technology Sharing

Deploy PostGIS with Docker

2024-07-11

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

Create the file docker-compose.yml

version: ‘3.3’
services:
db:
image: postgis/postgis:14-3.4
container_name: postgres_postgis
environment:
POSTGRES_DB: ais_spatial_db
POSTGRES_USER: root
POSTGRES_PASSWORD: my_passwd
ports:
- “54321:5432”
volumes:
- pgdata:/var/lib/postgis/data
volumes:
pgdata:

Excuting an order

docker-compose up -d