The PostgreSQL object-relational database system
892
opavlova/db-postgres:9.6
opavlova/db-postgres:9.5
opavlova/db-postgres:9.4
opavlova/db-postgres:9.3
opavlova/db-postgres:9.2
opavlova/db-postgres:9.1
Install docker https://docs.docker.com/engine/installation/ https://docs.docker.com/engine/userguide/
Add Docker support https://www.jetbrains.com/help/idea/docker.html
Create a Dockerfile with the following content in IntelliJ IDEA:
FROM opavlova/db-postgres:9.6
Create and run a New Run Configuration
click on the "Run on Docker' gutter (near "FROM" in the Editor) -> choose "New Run Configuration"
enter "-p 15432:5432" into the "Run options" field
Run ( results are in the Services View )
Create a connection to the database in the Database View:
go to the Database View, add new Data Source
add URL: add the URL: jdbc:postgresql://localhost:15432/DOCKERDB
add user=root, password - empty
Connect.
Go to the Services View
Connect to Docker
Pull the image
Select "Images" item
Enter "opavlova/db-postgres:9.6"
Press ctrl+click to pull the image
Run a container Select the pulled image in the list of images->Call context menu->Create Container Enter "-p 15432:5432" into the "Run options" field in the opened Docker Run Configuration (where port binding: "-p :") Run
Create a connection to the database in the Database View:
go to the Database View, add new Data Source
add URL: add the URL: jdbc:postgresql://localhost:15432/DOCKERDB
add user=root, password - empty
Connect.
db:
image: "opavlova/db-postgres:9.6"
ports:
- "15432:5432"
Run it by clicking on the "Run on Docker' gutter (near "services" in the Editor) Results are in the Services View.
Create a connection to the database in the Database View:
go to the Database View, add new Data Source
add URL: add the URL: jdbc:postgresql://localhost:15432/DOCKERDB
add user=root, password - empty
Connect.
Dockerfiles for opavlova/db-postgres images: https://github.com/IdeaUJetBrains/DockerFiles/tree/master/docker-dir/db/postgres/
Content type
Image
Digest
Size
105.8 MB
Last updated
about 10 years ago
docker pull opavlova/db-postgres:9.5