Tag: postgresql

How to customize the configuration file of the official PostgreSQL Docker image?

I’m using the the official Postgres Docker image. And now I’m trying to customize its configuration. For this purpose the command sed is used, e.g. to change the max_connections: sed -i -e”s/^max_connections = 100.*$/max_connections = 1000/” /var/lib/postgresql/data/postgresql.conf I tried two methods to apply this configuration. The first is by adding the commands to a script […]

Docker-compose environment variables

I am trying to setup a postgres container and want to setup the postgres login with: POSTGRES_USER: docker POSTGRES_PASSWORD: docker So I have created the docker-compose.yml like so web: build: . ports: – “62576:62576” links: – redis – db db: image: postgres environment: POSTGRES_PASSWORD: docker POSTGRES_USER: docker redis: image: redis I have also tried the […]

Connecting to Postgresql in a docker container from outside

I have Postgresql on a server in a docker container. How can I connect to it from the outside, that is, from my local computer? What setting should I apply to allow that?

How to link docker containers on build?

I linked my app container to postgres on run: docker run –link postgres:postgres someproject/develop and it worked fine. But I realized that I need to install some stuff to database with django command before run. So I need linking while build. How can I do that? docker build -h doesn’t have –link option.

How do I model a PostgreSQL failover cluster with Docker/Kubernetes?

I’m still wrapping my head around Kubernetes and how that’s supposed to work. Currently, I’m struggling to understand how to model something like a PostgreSQL cluster with streaming replication, scaling out and automatic failover/failback (pgpool-II, repmgr, pick your poison). My main problem with the approach is the dual nature of a PostgreSQL instance, configuration-wise — […]

Starting and populating a Postgres container in Docker

I have a Docker container that contains my Postgres database. It’s using the official Postgres image which has a CMD entry that starts the server on the main thread. I want to populate the database by running RUN psql –U postgres postgres < /dump/dump.sql before it starts listening to queries. I don’t understand how this […]

docker postgres pgadmin local connection

I have created an ubuntu image with nginx, php and postgres. I want to connect the postgres database in my current image with pgadmin located on my local machine. I have tried using docker inspector to try to use the image ip to make a connection with my local pgadmin but without much success. I’ve […]

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