Tag: postgresql

How do I connect the Postgres database running on the local machine to the docker container

I have a Flask application running on the container and Postgres database on the local machine and Now, I want to connect the Postgres DB (listening on 5432) to the docker container. Can any one suggest the best way to do it ? (I am new to docker containers) Thanks in advance.

Performance of IBM Containers Volumes

I’m running a postgres 9.5 database in IBM Containers. I modified the DockerHub image so that it will work with the Volumes feature offered by the Containers service (had to work around permissions issues related to this questions: Can I change owner of directory that is mounted on volume in IBM containers?). However, I’m now […]

java.net.ConnectException when running test with Flyway and embedded Postgresql inside Docker container

In order to properly test my Spring Boot application I am using embedded Postgresql in integration tests. Moreover I use Flyway too which is configured to use data source based on Postgresql configuration (take a look into EmbeddedPostgresConfiguration and FlywayConfiguration classes). All my tests pass without problems when running on my environment (OS X), but […]

Docker, postgres. Port is already allocated

I have some problems with build my project by docker. Screen of my error is below . What I have to change or which work have I stop to resolve this problems. Help pls

Dokku/Docker, how to access file in file system of running container?

Previously, to access a file in a running dokku instance I would run: docker ps to get the container ID followed by ls /var/lib/docker/aufs/diff/<container-id>/app/… note: I’m just using ‘ls’ as an example command. I ultimately want to reference a particular file. This must have changed, as the container ID is no longer accessible via this […]

How to restore postgres within a docker?

I create backups like this: docker exec DOCKER pg_dump -U USER -F t DB | gzip > ./FILE.tar.gz That’s the best way to restore the database given that the database runs within a container?

Can't connect to Postgres docker container from Golang container

I have a web server built using golang. It works successfully when I test it locally. However, when I build a docker image for my web server, it can’t connect to a running Postgres container. Here is my docker-compose.yml: version: ‘2’ services: go: image: golang:1.7 volumes: – ./:/server/http ports: – “80:8080” links: – postgres – […]

Correct way to change tcp_keepalives settings in postgres docker container

I want to change the following parameters of postgres config, tcp_keepalives_count, tcp_keepalives_idle, tcp_keepalives_interval. What is the recommended way to change them? Following is my docker-compose.yml postgres: restart: always image: postgres:latest volumes: – /data:/var/lib/postgresql ports: – “5432:5432” environment: – POSTGRES_USER=admin – POSTGRES_PASSWORD=postgres – POSTGRES_DB=postgres UPDATE I ended up modifying my docker-compose file postgres: restart: always image: […]

Connect from a Docker container to port of another docker container

I have two docker containers running on a linux host. One with a DATABASE and one with an APPLICATION. How can I connect from container APPLICATION to container DATABASE port 5432? For example: I start DATABASE container and bind port 5432 to hosts localhost with “-p5432:5432. But how can I acces this port from APPLICATION? […]

Save docker state (edited postgresql.conf file for example)

I have downloaded a postgresql docker image and at the moment editing some config files. The problem that I have is that whenever I edit the config files and commit the docker image (save it as a new one), it never saves anything. The image is still the same as the one I downloaded. Image […]

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