From be7af76b9aaa4b2744800657dcf9bf96b621ec4b Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 19 Jun 2014 16:10:43 +1000 Subject: [PATCH] FEATURE: test container --- image/discourse_dev/Dockerfile | 3 ++- image/discourse_test/Dockerfile | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 image/discourse_test/Dockerfile diff --git a/image/discourse_dev/Dockerfile b/image/discourse_dev/Dockerfile index 8a6c131..c053820 100644 --- a/image/discourse_dev/Dockerfile +++ b/image/discourse_dev/Dockerfile @@ -13,4 +13,5 @@ RUN cd opt/vim-setup && git submodule update --init RUN ln -s /opt/vim-setup/vimrc /etc/vim/vimrc.local RUN ln -s /opt/vim-setup/vimfiles/bundle /etc/vim/bundle RUN apt-get -y install ctags -RUN apt-get -y install thesilversearcher-ag +RUN apt-get -y install silversearcher-ag +RUN cd /var/www/discourse && rm -fr .bundle && sudo -u discourse bundle install --standalone diff --git a/image/discourse_test/Dockerfile b/image/discourse_test/Dockerfile new file mode 100644 index 0000000..2852065 --- /dev/null +++ b/image/discourse_test/Dockerfile @@ -0,0 +1,21 @@ +FROM samsaffron/discourse_21:2.1.2.1 + +MAINTAINER Sam Saffron "https://twitter.com/samsaffron" + +RUN apt-get install -y vim &&\ + wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 &&\ + tar -xjf phantomjs-1.9.7-linux-x86_64.tar.bz2 &&\ + rm phantomjs-1.9.7-linux-x86_64.tar.bz2 &&\ + cp phantomjs-1.9.7-linux-x86_64/bin/phantomjs /bin/phantomjs &&\ + rm -fr phantomjs-1.9.7-linux-x86_64 + +RUN cd /var/www/discourse &&\ + chown -R discourse . &&\ + rm -fr .bundle &&\ + sudo -u discourse git pull &&\ + sudo -u discourse bundle install --standalone &&\ + chown -R discourse /var/run/postgresql + +WORKDIR /var/www/discourse +ENV LANG en_US.UTF-8 +ENTRYPOINT sudo -E -u discourse bundle exec rake docker:test -- 2.25.1