Tag: postgresql

How to push a local database dump into a docker container?

I tried: ssh root@mytutumnode “docker exec -ti mydockercontainerid su postgres -c ‘psql mydatabasename'” < mydump.sql but it executes only ssh root@mytutumnode “docker exec -ti mydockercontainerid su postgres -c ‘psql mydatabasename'” … and omits < mydump.sql part. psql –list and alikes do work.

How to import SHP file into docker PostgreSQL container?

Hallow Experts, i am trying to import into PostgreSQL container “post_pl.shp” file. I have succeeded to import osm file with this command: osm2pgsql -H -U postgres -d gis –hstore -s -S ./osm_stylesheet ./hessen-latest.osm.pbf Now i need to do the same with post_pl.shp. Tnx Andrey

How to connect a running container(tomcat) on amazon ec2 to RDS postgres

In aws, I have an amazon linux instance running with docker installed and my app running as a container. It’s running in tomcat. However I need to connect it to my database. I have made this work with a postgres container earlier doing this: docker run –link <dbcontainername>:db -P -d tomcat-image But to have the […]

error with docker container with postgresql

I am unable to install postgresql on existing jenkins docker image,below are the list of steps i have followed: Step 1 : Download the jenkins and specify the name for the volume to jenkins-home as described in the below article http://www.catosplace.net/blog/2015/02/11/running-jenkins-in-docker-containers/ using the below command download the image and specify the volume docker create -v […]

Cannot access a Kubernetes postgresql service from the outside

I’m using Docker 1.10.1 and Kubernetes 1.0.1 on a local bare metal computer with Ubuntu 14.04, and I’m still new on this. That computer is the Kubernetes master as well as the node I’m using to make tests (I’m currently making a proof of concept). I created a couple of containers (1 nginx and 1 […]

Docker-Compose POSTGRES script only creates db not table

I am trying to create a postgres database that is seeable from another container by using docker-compose. I can link the containers, and I verified that they can see each other. What my problem seems to be is that my postgres container is not being provisioned correctly. I have a script called create_db.sql and I […]

Unable to execute Postgresql commands with python in seperate docker containers

I have this setup 1) Docker Container Server running postgresql image in background created with command docker run –name post2 -d postgres 2) Client Docker Container running ubuntu with python running psycopg2 My Postgresql container is exposed on ip address I’m able to communicate with the server when enter command curl in my […]

Docker / Postgres: Mounting an existing database within a dockerized Postgresql

So I’m having a problem mounting an existing set of data for Docker Postgres that I cannot figure out for the life of me. Here’s my docker compose file. version: ‘2’ services: postgresql: image: postgres:9.5 environment: – PGDATA=/data ports: – ‘5432:5432’ volumes: – ~/.postgresql:/data web: build: . command: sbt/sbt run volumes: – .:/app ports: – […]

No suitable driver found for jdbc:postgresql when trying to connect spark-shell (inside a docker container) to my PostgreSQL database

I’m running Spark on a docker container (sequenceiq/spark). I launched it like this: docker run –link dbHost:dbHost -v my/path/to/postgres/jar:postgres/ -it -h sandbox sequenceiq/spark:1.6.0 bash I’m sure that the postgreSQL database is accessible through the address postgresql://user:password@localhost:5432/ticketapp. I start the spark-shell with spark-shell –jars postgres/postgresql-9.4-1205.jdbc42.jar and since I can connect from my Play! application that has […]

Docker Postgres – PDO exception get

I am new with Docker, but I am in trouble, I’ve get this error always: Fatal error: Uncaught PDOException: could not find driver in /var/www/html/index.php:16 Stack trace: #0 /var/www/html/index.php(16): PDO->__construct(‘pgsql:host=loca…’, ‘project’, ‘project’) #1 {main} thrown in /var/www/html/index.php on line 16 Here is my index.php: <?php $database = $user = $password = “project”; $host = “localhost”; […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.