[英]Import osm data in Docker postgresql
i am trying to use Docker. 我正在尝试使用Docker。 So i installed in Docker postgresql image.
所以我安装在Docker postgresql映像中。
Until now, when i imported osm data into postql i used this command: 到目前为止,当我将osm数据导入postql时,我使用了以下命令:
psql -U postgres mydb
CREATE EXTENSION postgis;
osm2pgsql -U postgres -d mydb -s -S ./osm_stylesheet /home/ramnikov/Downloads/hessen-latest.osm
How can i do the same inside Docker after this command 在此命令后我如何在Docker内部做同样的事情
$ sudo docker exec -it postgresql sudo -u postgres psql
or before this command ? 还是在此命令之前?
Tnx 特纳克斯
Andrey 安德烈
You can execute osm2pgsql
outside of Docker: 您可以在Docker外部执行
osm2pgsql
:
-H|--host Database server host name or socket location.
-H | --host数据库服务器主机名或套接字位置。
As well as psql
: 以及
psql
:
-h, --host=HOSTNAME database server host or socket directory
-h,--host = HOSTNAME数据库服务器主机或套接字目录
Like this: 像这样:
psql -h dockerIP -U postgres -d mydb -c 'create extension postgis'
osm2pgsql -H dockerIP -U postgres -d mydb -s -S ./osm_stylesheet /home/ramnikov/Downloads/hessen-latest.osm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.