Tag: postgresql

custom docker image is not running postgres

I am trying to create my own custom docker file for circleci v2. however, I am running into an issue where the postgres server is not running. I’ve run service postgresql start to no available. the message I’m getting is: psql: could not connect to server: Connection refused Is the server running locally and accepting […]

Best practice for rails docker-compose db:create db:migrate

I have simple rails application with docker-compose.yml file. It consists from two containers – db container with PostgreSQL and web container with rails app. In dockerfile for web part I have such lines in CMD CMD RAILS_ENV=production rake db:create db:migrate && \ bundle exec rails s -p 3000 -b ‘’ –environment=production So in line rake […]

docker-compose exit depends_on service after tests

How do I get a service container to exit once the dependent container has finished? I have test suite running in the app_unittestbot container that depends_on a postgresql db server (postgres:9.5-alpine) running in separate container. Once the test suite exits, I want to check the return code of the test suite and halt the database […]

Error response from daemon: network bridge not found

I just got these messages after starting my docker service on ubuntu 14.04, and trying to starting the postgres container. $ docker start codeslave-postgres –> starting my container $ Error response from daemon: network bridge not found $ Error: failed to start containers: codeslave-postgres I was try to stop and restart docker service and also […]

java web app and Postgres on websphere-liberty

I’m deploying a working Tomcat webapp on websphere-liberty on docker. The webapp connects to a postgres data source on docker. In websphere when I try to get connection with DataSource ds = (DataSource)ctx.lookup(“java:comp/env/jdbc/postgres”); Connection conn = ds.getConnection(); my web.xml is setted as: <resource-ref> <description>postgreSQL Connection</description> <res-ref-name>jdbc/postgres</res-ref-name> <res-type>javax.sql.XADataSource</res-type> <res-auth>Container</res-auth> </resource-ref> I get the following error javax.naming.NamingException: […]

Solr running inside docker container is not connecting to PostgreSQL database

I have PostgreSQL and Solr, in a docker container, running on the same machine. I am trying to do a dataimport from Postgres into Solr, but I am getting errors. Here are the relevant parts of the log: Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: SELECT * FROM formulas org.postgresql.util.PSQLException: Connection to […]

Which way to run PostgeSQL in Docker?

Which of these methods is correct? One db container for each app One db container for all apps Install db without docker I tried to find information, but nothing. Or I badly searched?

Migrate data from a data only postgresql docker volume

I have a data only postgresql container docker create -v /var/lib/postgresql/data –name bevdata mdillon/postgis /bin/true I have a running Postgis container docker run –name bevaddress -e POSTGRES_USER=bevsu -e POSTGRES_DB=bevaddress -P -d –volumes-from bevdata mdillon/postgis I have made a backup of that database into the bavaddress container into directory /var/lib/postgresql/backup I think this means that the […]

Can't access postgresql in a docker container from a VM

I have a VM that is set up with vagrant via bash provisioning. I try to install a bundle of applications and tools insode the VM upon startup and a few of those require a PostgreSQL database. I stripped down the provisioning phase to only include the necessary parts: install.sh: function installPostgresql() { docker pull […]

Cyclic backups of a docker postgresql container

I would like to deploy an application using docker and would like to use a postgresql container to hold my data. However I am worried about losing data, so I need back-ups. I know I could run a cron job on the host to dump the data out from the container, however this approach is […]

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