From d93d239c0bf645ce59a6598c97ce70587288a853 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Sun, 3 Nov 2013 16:45:32 -0800 Subject: [PATCH] move pups into image --- .gitignore | 2 +- image/Dockerfile | 2 ++ launcher | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c61ca8f..15c4e91 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ shared/pups *.swp cids/* -shared/config/web1/conf.yml +*.yml diff --git a/image/Dockerfile b/image/Dockerfile index fa54e90..a4995d1 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -44,6 +44,8 @@ RUN apt-get -y update &&\ apt-get install -y runit &&\ locale-gen en_US +RUN cd / && git clone https://github.com/SamSaffron/pups.git + # RUN cd /var/www/discourse && bundle exec rake db:test:prepare && bundle exec rspec # mkdir -p /src/godeb && cd /src/godeb && curl -O https://godeb.s3.amazonaws.com/godeb-amd64.tar.gz &&\ diff --git a/launcher b/launcher index 5f9e37f..ed896a1 100755 --- a/launcher +++ b/launcher @@ -2,7 +2,7 @@ command=$1 config=$2 -config_file=shared/config/"$config"/conf.yml +config_file="$config".yml cidfile=cids/"$config".cid cidbootstrap=cids/"$config"_boostrap.cid @@ -33,7 +33,8 @@ fi case "$command" in bootstrap) - docker run -cidfile $cidbootstrap -i -t -v `pwd`/shared:/shared samsaffron/discourse /shared/pups/bin/pups /$config_file + exec cat $config_file | docker run -cidfile $cidbootstrap -i -a stdin -a stdout -a stderr -v `pwd`/shared:/shared samsaffron/discourse /pups/bin/pups --stdin + sleep 5 docker commit `cat $cidbootstrap` samsaffron/discourse $config docker rm `cat $cidbootstrap` && rm $cidbootstrap exit 0 -- 2.25.1