Tag: postgresql

How to use docker to spin up postgres database

I’m trying to have my app code communicate with my postgres db, each of which is running in separate container. However, whenever I attempt to access my db, I keep getting “dial tcp getsockopt: connection refused” which I understand to mean that there is nothing listening on port 5432. But I don’t understand how […]

slow pg_restore on docker container startup

I have dockerized my PostgreSQL DB (about 4GB of data). It is working fine on my notebook (linux, 2core CPU, SSD, 8GB RAM). I am trying to move it using docker hub to free AWS EC2 t2.micro. On startup of container, there are executed some scripts, that set up structure of schema and tables and […]

Connecting a Play! application to a postgres (with Postgis) database with Docker-compose

I’m trying to start my Play! 2.4 application using a Postgres database with Docker-compose. I manage to start my Play! application alone (but it doesn’t work since it can’t connect to the database). And I also manage to start my postgis database using the image mdillon/postgis:9.4. My Dockerfile is: FROM mdillon/postgis:9.4 ADD init.sql /docker-entrypoint-initdb.d/ Here […]

Postgres DB Password not being set in Kubernetes script

For some reason, the postgres instance isn’t being locked down with a password using the following kubernetes script. apiVersion: v1 kind: ReplicationController metadata: name: postgres labels: name: postgres spec: replicas: 1 template: metadata: labels: name: postgres spec: containers: – resources: image: postgres:9.4 name: postgres env: – name: DB_PASS value: password – name: PGDATA value: /var/lib/postgresql/data/pgdata […]

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 […]

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