Tag: postgresql

Running PostgreSql inside Docker

I have the following config lines: RUN sudo apt-get -y install postgresql USER postgres RUN /etc/init.d/postgresql start &&\ psql –command “CREATE USER test WITH SUPERUSER PASSWORD ‘test’;” &&\ createdb -O test test EXPOSE 5432 CMD [“mono”, “src/Rest.Api/bin/Debug/Rest.Api.exe”] However, running the final command to spin up my API yields this: setting listen on Failed to establish […]

Migration from MySQL to postgresql using Django and Docker – relation “authtoken_token” does not exist

I am trying to migrate my Django project using MySQL database to postgresql with Docker. When I use MySQL everything works fine. I have all in ORM so when I use MySQL I have to create only database and do python manage.py makemigrations and then python manage.py migrate and I get ready database with all […]

Installing postgre driver in php7-fpm Docker container

I’ve installed PHP:latest Docker container using the docker-compose command. It installed php-7.1.6-fpm in my Docker. When I tried to install php7-pgsql extension it failed to find that package, instead found pdo and pdo_pgsql packages. That will not satisfy my need. When I search for the available packages in the installed PHP container, I could not […]

Trying to create postgis inside docker file gives the error

Here is the command that I’m trying to run. I’m using official postgres docker image. I can’t find any info about ‘is not a database cluster directory’ Step 7 : RUN pg_ctl start -w && createdb postgis_template -E UTF8 && psql -d postgis_template -c “create extension if not exists postgis;” && pg_ctl stop -w —> […]

What is the best approach to configure Docker for a webapp?

I would like to configure a Docker container for running a Java application that uses Postgres and Jetty. What is the best approach to do this: Pull three separate containers from the Docker hub and somehow use them together. Create a Dockerfile from scratch with all configurations. Pull three images from the Docker hub and […]

How to start Phoenix by using PostgeSQL through container?

I’m tried: $ alias psql=”docker exec -ti pg-hello-phoenix sh -c ‘exec psql -h localhost -p 5432 -U postgres'” $ mix ecto.create but got: ** (RuntimeError) could not find executable psql in path, please guarantee it is available before running ecto commands lib/ecto/adapters/postgres.ex:106: Ecto.Adapters.Postgres.run_with_psql/2 lib/ecto/adapters/postgres.ex:83: Ecto.Adapters.Postgres.storage_up/1 lib/mix/tasks/ecto.create.ex:34: anonymous fn/2 in Mix.Tasks.Ecto.Create.run/1 (elixir) lib/enum.ex:604: Enum.”-each/2-lists^foreach/1-0-“/2 (elixir) lib/enum.ex:604: […]

I am getting an error when i am trying to build my Docker postgres image

I have a requirement to build a custom docker image of a postgresql database that is postGIS enabled. Now there is this is an already existing image that does this HERE , But this is an assignment given to me and so i have to make my own docker file and image. What i tried […]

Import osm data in Docker postgresql

i am trying to use Docker. So i installed in Docker postgresql image. Until now, when i imported osm data into postql i used this command: psql -U postgres mydb CREATE EXTENSION postgis; osm2pgsql -U postgres -d mydb -s -S ./osm_stylesheet /home/ramnikov/Downloads/hessen-latest.osm How can i do the same inside Docker after this command $ sudo […]

Node npm test to seeded postgres, Docker network container seeing varying results

I am running an Angular Node npm test against a seeded postgres database. This works in one environment but not another. I have exported the images to and moved them from one environment to the other, and the results indicate that there’s a difference with the environments and not the docker images. I also have […]

Running Tomcat with PostgreSql using Dockerfile

I want to run a Tomcat with PostgreSql database within the same Dockerfile. I have the following Dockerfile FROM tomcat:8-jre7 MAINTAINER “Sonam <mymail@gmail.com>” RUN apt-get -y update Add simplewebapp.war /usr/local/tomcat/webapps/ RUN apt-get update && apt-get -y upgrade FROM postgres When I run the docker image, I can’t access the Tomcat like I could if I […]

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