I need to use this Docker Hub image:
https://hub.docker.com/r/kartoza/postgis/
to have the PostgreSQL database and its PostGIS plugin available on my PC.
Below you will find all the input and output code.
I need PostgreSQL because I’m doing a java course and I have to learn how to use JDBC.
Thank you so much
Code:
1) DOCKERFILE:
FROM kartoza/postgis:9.6-2.4
LABEL Author=“Nome Cognome”
EXPOSE 5432
VOLUME create pg_data
2) CLI:
docker build -t postgresql-postgis-eb:9.6-2.4 .
docker run --name=postgis -d -e POSTGRES_USER=eb -e POSTGRES_PASS=password -e POSTGRES_DBNAME=gis -e ALLOW_IP_RANGE=0.0.0.0/0 -p 5432:5432 -v pg_data:/var/lib/postgresql --restart=always postgresql-postgis-eb:9.6-2.4
3) BROWSER:
http://192.168.99.103:5432/
4) I READ IN THE BROWSER:
The page does not work 192.168.99.103 has not sent data.
ERR_EMPTY_RESPONSE
5) WINDOWS PROMPT:
https://paste.ubuntu.com/p/2JySyrZfQY/
Docker version: 18.09.3
Windows version: Windows 10 Pro Ita 64 bit updated to 15 April 2019