Tag: postgresql

Docker container not starting when connect to postgresql external

I have docker container with redmine in it and I have postgresql-95 running on my host machine, and I want to connect my redmine container to my postgresql. I followed this step : https://github.com/sameersbn/docker-redmine, to connect my container with external postgresql. assuming my host machine with ip, so I ran this command : docker […]

web_1 | /docker-entrypoint.sh: line 99: exec: bundle: not found app_web_1 exited with code 127

I’m trying to use docker to push my existing rails project to a docker container. I’m using postgres database. When I did $> docker-compose up I get following error in the logs. web_1 | /docker-entrypoint.sh: line 99: exec: bundle: not found app_web_1 exited with code 127 – # Dockerfile FROM ruby:2.2.0 RUN apt-get update -qq […]

PostgreSQL Docker installation how to setup initial database

I am pretty new to the docker technology and working on setting up the docker container with PostgreSQL setup, up and running as a service and default database created with initial schema created with the .sql file. The docker file i am using is as below – FROM centos:centos6 # Upgrading system #RUN yum -y […]

Create Docker image for NodeJS + PostgreSQL web application

I’ve been reading Docker’s documentation, but I can’t get around creating an image that will work. I have a NodeJS application that uses PostgreSQL as database: var connectionString = process.env.DATABASE_URL || ‘postgres://localhost:5432/db’; var pg = require(‘pg’); var pgp = require(‘pg-promise’)(); var db = pgp(connectionString); db.func(‘some_storedProcedure’).then(//…) //… I first created a Dockerfile according to Node’s documentation […]

Tomee and Postgres communication with Docker

I have 2 Dockerfiles, one for tomee and another one for Postgres: Postgres: https://drive.google.com/folderview?id=0B-aNPJi4oG7scGZ5cng5SHhzSnM&usp=sharing Tomcat: https://drive.google.com/folderview?id=0B-aNPJi4oG7sTDZ0cXJoSTVoT3c&usp=sharing After the creation of the image (postgres-img and tomee-img), I run the containers in this way: docker run -p 5432:5432 -e POSTGRES_PASSWORD=postgres –name= postgress postgres-image and then tomee docker crete -p 8080:8080 –link postgress:postgress –name=tomcatt tomee-img When I start […]

Postgresql – authentication failed in Docker

Im trying to run postgresql in my Docker container. Here is my DockerFile for postgresql FROM postgres:9.5.2 RUN localedef -i ru_RU -c -f UTF-8 -A /usr/share/locale/locale.alias ru_RU.UTF-8 ENV LANG ru_RU.utf8 ENV POSTGRES_PASSWORD OaO1OHrzTZ3cqyLnju2z ENV PROJECT_USER test ENV PROJECT_DATABASE test COPY config/init-user-db.sh /docker-entrypoint-initdb.d/init-user-db.sh init-user-db.sh #!/bin/bash set -e psql -v ON_ERROR_STOP=1 –username “$POSTGRES_USER” <<-EOSQL CREATE EXTENSION “adminpack”; […]

Invalid Message Format on Postgresql using Docker

Don’t know if it is a docker related problem, or a postgres one. I’m having problems when executing “long” queries, such as: INSERT INTO schema.table VALUES (1111111, 1111, ‘whatever’), (1111112, 2222, ‘any other’), … (1111113, 3333, ‘something else’); with 200+ lines. The 209 lines give a string length of 8746 characters (not that much, I […]

portforwarding a node/postgres application in docker

I’m getting started with docker and I am trying to run a node/postgres application. When I run the app using docker-compose up I get the following output: Starting nodedocker_db_1 Starting nodedocker_myapp_1 Attaching to nodedocker_db_1, nodedocker_myapp_1 db_1 | LOG: database system was shut down at 2016-08-03 08:33:02 UTC db_1 | LOG: MultiXact member wraparound protections are […]

How to initialize a database on a data volume container?

Here my simple scenario, I have a simple Flaskapp that connect to a postgres this way: SQLALCHEMY_DATABASE_URI=’postgresql://username:secretpassword@postgres:5432/myproj’ And I have a simple docker-compose.yml: version: ‘2’ services: postgres: image: postgres:latest volumes_from: – data environment: POSTGRES_PASSWORD: secretpassword POSTGRES_USER: username POSTGRES_DB: myproj ports: – “5432:5432” web: build: . volumes_from: – app ports: – “5000:5000” depends_on: – postgres data: […]

Docker Compose: Allow images to access host resources (like postgresql)

Our infrastructure uses Docker containers to separate our services. I’m beginning to set up our docker-compose to aid in local development. Some of our services use the Ruby on Rails framework, and developing locally for that is quickest by running the server and database locally (traditional Rails development). To more closely mimic the production environment, […]

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