Tag: postgresql

Problems deploying Keycloak in HA using Postgres in Docker

We followed the steps on this web site: http://blog.keycloak.org/2015/04/running-keycloak-cluster-with-docker.html and deployed keycloak with the following commands: First, the PostgreSQL database: docker run –name postgres -e POSTGRES_DATABASE=keycloak -e POSTGRES_USER=keycloak -e POSTGRES_PASSWORD=password -e POSTGRES_ROOT_PASSWORD=password -d postgres then, we started the first instance of Keycloak: docker run -p 8080:8080 –name keycloak –link postgres:postgres -e POSTGRES_DATABASE=keycloak -e POSTGRES_USER=keycloak -e […]

Docker Postgresql Error: docker-entrypoint.sh: line 105: cannot create temp file for here-document: Permission denied

I am trying to run a postgresql instance in docker using the alpine images like this docker run –name some-postgres -e POSTGRES_PASSWORD=mysecretpassword postgres:9-alpine but it gives me the following output The files belonging to this database system will be owned by user “postgres”. This user must also own the server process. The database cluster will […]

How to start postgresql and rsync during docker run?

I am trying to build a content delivery network container which uses postgresql and rsync. I have my dockerfile ready, but the services will start during the build. Later when the run the docker the services will be in stopped state. I want both the services mentioned above to be running when I run “docker […]

Starting postgres service in docker entry script

I am new to docker and I want to put my django website inside a docker container. I have setup the container as described here: http://michal.karzynski.pl/blog/2015/04/19/packaging-django-applications-as-docker-container-images/ I also created an entry script named entryPointScript.sh that contains the following: #!/bin/bash service postgresql start sleep 2s #sleep for two seconds source /srv/project/EnvProject/bin/activate python /srv/project/manage.py collectstatic –noinput # […]

Sharing POSTGRES's local DATA folder with DOCKER machine

I need to share the Postgres’s data folder with a docker container but it gives me operation not permitted error. ls -la /Library/PostgreSQL/9.3/ drwxr-xr-x 16 root daemon 544 Feb 1 17:24 . drwxr-xr-x 3 root daemon 102 Feb 1 17:24 .. -r–r–r– 1 root daemon 52799 Oct 25 11:17 3rd_party_licenses.txt drwxr-xr-x 38 root daemon 1292 […]

Docker volume details for Windows

I am learning docker and deploying some sample images from the docker hub. One of them requires postgresql. When I deploy without specifying a volume, it works beautifully. When I specify the volume ‘path on host’, it fails with inability to fsync properly. My question is when I inspect the volumes, I cannot find where […]

How to run sql script before the application launches in docker

I’m deploying the project with Asp.net Core, PostgreSql and Docker in Windows 10 (no PostgreSql installed). So I have to run sql script to update data before the application launches (for registering a singleton dependency injection). The content of my Dockerfile as following: # TODO use official docker image FROM microsoft/dotnet:1.1.0-sdk-projectjson # Install .NET CLI […]

Docker build unable to install pg gem in Sinatra project

I’ve reviewed all the posts on SO with similar errors installing the Postgres pg gem. My issue is unique: I can successfully add Postgres to my Sinatra Ruby project via the Gemfile and bundle install — however when building the Docker image it fails installing pg with the following error: ERROR: Error installing pg: ERROR: […]

JDBC driver class not loading for JAVA app when it connects to Postgres in Docker

I have a docker container set up locally with CentOS and Boot2Docker. The goal is to install a JAVA application that connects to Postgres. Java JDK and JRE for 1.8 are installed. Postgres is up and running. I am able to connect to it with psql and do work. The Java application was compiled as […]

Docker – Karaf image with Mongo Image

I have created the karaf dockerfile from scratch and it works with my application. Now, the postgreSQL and the MongoDB containers need to be running on the same network as the karaf container for the final step. Essentially, what i have so far is three separate dockerfiles. And what i need is for them to […]

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