Giter VIP home page Giter VIP logo

docker-postgresql's Issues

multiple databases at startup

Is it possible to create multiple databases at startup?

docker-compose.yml

db:
    image: postgres
    environment:
        - POSTGRES_DB=db1
        - POSTGRES_DB=db2
        - POSTGRES_USER=user
        - POSTGRES_PASSWORD=pwd
        - POSTGRES_ROOT_PASSWORD=rootpwd

Postgresql 9.1+

Your ubuntu and postgres versions are a little out of date. I am seeing a few forks trying to resolve this issue. I was wondering if you could update your images, so that I may continue to rely on them?

This is better

This is a much better implementation of the official postgres image on docker hub.

I think you should continue to maintain it.

Permissions Error

Run example as in README get


~ # ❯❯❯ docker logs f4e7287bfef7a19056488801f265a44318414103f29468bcbbe62541432606b2                                                                                                                    
sudo: unable to execute /usr/lib/postgresql/9.3/bin/postgres: Permission denied

Database encoding is set to SQL_ASCII

The dockerfile lists initdb params of UTF-8 but the databases that ship by default with this image are all SQL_ASCII.

\l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+-----------+---------+-------+-----------------------
docker | docker | SQL_ASCII | C | C |
postgres | postgres | SQL_ASCII | C | C |
template0 | postgres | SQL_ASCII | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | SQL_ASCII | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
(4 rows)

Executable run

Hi:

Nice work! I think you forgot to make "run" executable in Dockerfile. It fails to run for me otherwise. I added:

RUN chmod +x /usr/local/bin/run

pgadmin connection error

On connection by pgadmin to new database it get error: Error connctiong to the server: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request

Image does not work on ubuntu 14.04 (docker 0.9.1)

Currently I have tested it on two different ubuntu 14.04 setups with the "docker.io" (verion 0.9.1) package installed.

Running the image from the docker index as indicated in the Readme immediately exits with no logs.

I forked the project and built the image myself and everything works fine. Side note: the official image works perfectly on a docker vps from digitalocean (13.10, docker 0.11.1).

Database not created using $POSTGRESQL_DB

I know this repository is being deprecated but I'm just being curious as I still use this image for some projects instead of the official one (for CI tools). Problem is database is not created as expected on container runtime.

Update version

Hi, is there a way to use another PostgreSQL version?
The current version uses 9.3 but unfornatly i need the version 9.4 in my project.

The type JSONB is new and only available in the new versions of PostgreSQL

Unable to run example from readme

I am running this image using in fresh, ubuntu 14.04, Vagrant-managed vm running the docker 1.1 (installed from the official docker deb repo).

vagrant@vagrant-ubuntu-trusty-64:/vagrant$ uname -a
Linux vagrant-ubuntu-trusty-64 3.13.0-30-generic #54-Ubuntu SMP Mon Jun 9 22:45:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ docker -v
Docker version 1.1.1, build bd609d2

I am running this image using fig. I build the and tag the image with fig build, not using docker directly. The issue comes when I try to run the example given in the repo's readme:

vagrant@vagrant-ubuntu-trusty-64:/vagrant$ docker run -d -p 5432:5432 -e POSTGRESQL_USER=test -e POSTGRESQL_PASS=oe9jaacZLbR9pN -e POSTGRESQL_DB=test orchardup/postgresql
96184caf3879435db6fe15b8eb0e671f202acfd922571671fc04a040b9593814
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ docker ps
CONTAINER ID        IMAGE                         COMMAND              CREATED             STATUS              PORTS                    NAMES
96184caf3879        orchardup/postgresql:latest   /usr/local/bin/run   5 seconds ago       Up 3 seconds        0.0.0.0:5432->5432/tcp   hopeful_fermi       
vagrant@vagrant-ubuntu-trusty-64:/vagrant$ psql -h localhost -U test test
psql: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

The postgres container appears to be running and listening on the correct port. The port appears to be forwarded correctly on the host:

vagrant@vagrant-ubuntu-trusty-64:/vagrant$ netstat -a
....
tcp6       0      0 [::]:postgresql         [::]:*                  LISTEN
....

The connection isn't refused - it's being immediately closed by the postgres instance. My best guess is that this is an authentication problem, but I'm not sure how to diagnose it. (My apologies, I'm new to postgres admin.) I'm not running into any issues with other fig-managed containers (my app and orchardup/docker-redis).

Let me know if you need more info. I'll keep looking into this on my end.

could not open file "/var/lib/postgresql/9.1/main/PG_VERSION": Permission denied

I recently installed Ubuntu 14.04, using Docker version 1.0.1, build 990021a

I had an existing installation(Ubuntu 13.10); reusing the same location for data storage, but now I get when trying to start the container:

2014-06-26 17:20:59 UTC FATAL: could not open file "/var/lib/postgresql/9.1/main/PG_VERSION": Permission denied

I have postgresql 9.3 installed systemwide from the repositories there is no 9.1; which should not matter.

Connecting to DBs from OS X host

Is there any special configuration/incantation to connect via an OS X host? I actually can't connect to any postgresql container I've come across, including this and a few I've built. Works fine from Ubuntu.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.