Import osm data in Docker postgresql

i am trying to use Docker. So i installed in Docker postgresql image.

Until now, when i imported osm data into postql i used this command:
psql -U postgres mydb

  • Error running kubelet, node not ready
  • docker rmi cannot remove images, with: no such id
  • Where is the default directory of the export csv file that COPY generated in cassandra?
  • How to run a jar file using docker image?
  • aufs au_opts_parse:1155:docker[2010] unknown option dirperm1
  • Docker compose ruby + postgres - cannot connect to postgres

    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

    $ sudo docker exec -it postgresql sudo -u postgres psql

    or before this command ?



  • Run two services in same Docker container on CoreOS?
  • How to bind a shared directory from container to host in Docker
  • Docker push image to Hub
  • Selenium server works with Docker on MacOS but not on Jenkins
  • Making an API call from dockerized web page to back-end server ends up with net::ERR_CONNECTION_REFUSED
  • Prometheus with multi-container pod on kubernetes
  • One Solution collect form web for “Import osm data in Docker postgresql”

    You can execute osm2pgsql outside of Docker:

    -H|–host Database server host name or socket location.

    As well as psql:

    -h, –host=HOSTNAME database server host or socket directory

    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
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.