"PostGIS"を起動する
kartoza/postgis:9.6-2.4
1) docker pull kartoza/postgis:9.6-2.4
2) WORKAREA=$pwd
3) mkdir $HOME/pg_data
4) docker run --name=osmdb -m 2g -d -e POSTGRES_USER=alex -e POSTGRES_PASS=password -e POSTGRES_DBNAME=osmdb -e ALLOW_IP_RANGE=0.0.0.0/0 -p 5432:5432 -v $HOME/pg_data:/var/lib/postgresql --restart=always kartoza/postgis:9.6-2.4
--name=osmdb
-m 2g
momory 2GB-e POSTGRES_USER=gisuser
-e POSTGRES_PASS=password
-e POSTGRES_DBNAME=osmdb
-e ALLOW_IP_RANGE=0.0.0.0/0
すべてのIPからの接続を許可する-p 5432:5432
-v $HOME/pg_data:/var/lib/postgresql
PostgreSQL databade data folder--restart=always
$ docker pull kartoza/postgis:9.6-2.4 $ mkdir $ mkdir $HOME/pg_data $ docker run -m 2g --name=osmdb -d -e POSTGRES_USER=alex -e POSTGRES_PASS=password -e POSTGRES_DBNAME=osmdb -e ALLOW_IP_RANGE=0.0.0.0/0 -p 5432:5432 -v $HOME/pg_data:/var/lib/postgresql --restart=always kartoza/postgis:9.6-2.4 $
1) docker pull dpage/pgadmin4
2) docker run --name=pgadmin4 -p 80:80 -e "PGADMIN_DEFAULT_EMAIL=gisuser@domain.com" -e "PGADMIN_DEFAULT_PASSWORD=gisuser" -d dpage/pgadmin4
3) pgAdmin4 : Login
http://localhost/
gisuser@domain.com
gisuser
4) pgAdmin4 : 接続 / Connection
localhost
5432
postgres
alex
password
osmdb.properties
db_driver=org.postgresql.Driver db_url=jdbc:postgresql://172.17.0.1:5432/osmdb db_user=alex db_passwd=password
""
echo '*:*:*:alex:password' > ~/.pgpass chmod 600 ~/.pgpass
stop pgAdmin4 docker stop stupefied_poitras
stop postGIS docker stop postgis