-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arthur Axel 'fREW' Schmidt
committed
Feb 22, 2014
1 parent
56620b6
commit 4fa2073
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# docker pull orchardup/mysql | ||
docker run -rm -p 3306:3306 -P \ | ||
-e MYSQL_DATABASE=docker \ | ||
-e MYSQL_USER=docker \ | ||
-e MYSQL_PASSWORD=docker \ | ||
-name mysql_test orchardup/mysql & | ||
|
||
# stupid mysql | ||
sleep 2 | ||
|
||
docker build -t eg_postgresql pg.docker | ||
docker run -rm -p 5432:5432 -P -name pg_test eg_postgresql & | ||
|
||
export DBIITEST_PG_DSN='dbi:Pg:database=docker;host=127.0.0.1;port=5432' | ||
export DBIITEST_PG_PASSWORD=docker | ||
export DBIITEST_PG_USER=docker | ||
|
||
export DBIITEST_MYSQL_DSN='dbi:mysql:database=docker;host=127.0.0.1;port=3306' | ||
export DBIITEST_MYSQL_PASSWORD=docker | ||
export DBIITEST_MYSQL_USER=docker | ||
|
||
prove "$@" | ||
|
||
docker stop pg_test | ||
docker stop mysql_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM ubuntu | ||
MAINTAINER frioux@gmail.com | ||
|
||
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 | ||
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list | ||
RUN apt-get update | ||
RUN DEBIAN_FRONTENT=noninteractive apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 | ||
|
||
USER postgres | ||
|
||
RUN /etc/init.d/postgresql start &&\ | ||
psql --command "CREATE USER docker WITH SUPERUSER PASSWORD 'docker';" &&\ | ||
createdb -O docker docker | ||
|
||
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf | ||
RUN echo "listen_addresses='*'" >> /etc/postgresql/9.3/main/postgresql.conf | ||
|
||
EXPOSE 5432 | ||
|
||
CMD ["/usr/lib/postgresql/9.3/bin/postgres", "-D", "/var/lib/postgresql/9.3/main", "-c", "config_file=/etc/postgresql/9.3/main/postgresql.conf"] |