From: Sam Date: Mon, 30 Mar 2015 01:20:40 +0000 (+1100) Subject: Added a 2.2 image and updated test to use it X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=cef7714fdbabef33ecc55dd5d931961c7594a78b;p=discourse_docker.git Added a 2.2 image and updated test to use it --- diff --git a/image/base_22/Dockerfile b/image/base_22/Dockerfile new file mode 100644 index 0000000..823a92a --- /dev/null +++ b/image/base_22/Dockerfile @@ -0,0 +1,16 @@ +# Official repo only has a ppa for postgresql 9.3 at the moment (14/3/2014) +# When new LTS ships we can upgrade + +# VERSION 0.1.0 +FROM samsaffron/discourse_base:1.0.7 + +MAINTAINER Sam Saffron "https://twitter.com/samsaffron" + +RUN apt-get -y install ruby bison autoconf &&\ + echo install_package "openssl-1.0.1l" "https://www.openssl.org/source/openssl-1.0.1l.tar.gz#b2cf4d48fe5d49f240c61c9e624193a6f232b5ed0baf010681e725963c40d1d4" mac_openssl --if has_broken_mac_openssl > /src/2.2.2-github &&\ + echo install_package "ruby-2.2.2-github" "https://github.com/SamSaffron/ruby/archive/2.2.2-github.tar.gz#407654b4fe9dd61ca7e26d8d7e4c8631" autoconf ldflags_dirs standard verify_openssl >> /src/2.2.2-github &&\ + ruby-build /src/2.2.2-github /usr/local &&\ + apt-get -y remove ruby &&\ + gem update --system &&\ + gem install bundler &&\ + rm -fr /src/ruby-build diff --git a/image/discourse_22/Dockerfile b/image/discourse_22/Dockerfile new file mode 100644 index 0000000..f7f7032 --- /dev/null +++ b/image/discourse_22/Dockerfile @@ -0,0 +1,21 @@ +# Current version 1.0.8 +FROM samsaffron/discourse_base_22:1.0.0 + +MAINTAINER Sam Saffron "https://twitter.com/samsaffron" + +# Discourse specific bits +RUN useradd discourse -s /bin/bash -m -U &&\ + mkdir -p /var/www && cd /var/www &&\ + git clone https://github.com/discourse/discourse.git &&\ + cd discourse &&\ + git remote set-branches --add origin tests-passed &&\ + chown -R discourse:discourse /var/www/discourse &&\ + cd /var/www/discourse &&\ + sudo -u discourse bundle install --deployment \ + --without test --without development &&\ + find /var/www/discourse/vendor/bundle -name tmp -type d -exec rm -rf {} + + + +# For a smaller but less flexible image: +#RUN apt-get -y autoremove build-essential gcc gcc-4.7 .+-dev +#RUN echo image size: $(du -hsx /) diff --git a/image/discourse_test/Dockerfile b/image/discourse_test/Dockerfile index 2297e6f..7b3a041 100644 --- a/image/discourse_test/Dockerfile +++ b/image/discourse_test/Dockerfile @@ -1,14 +1,7 @@ -FROM samsaffron/discourse_21:2.1.2.1 +FROM samsaffron/discourse_22:1.0.0 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 &&\ @@ -16,10 +9,6 @@ RUN cd /var/www/discourse &&\ sudo -u discourse bundle install --standalone &&\ chown -R discourse /var/run/postgresql -# RUN cd /var/www/discourse &&\ -# sudo -u discourse git pull &&\ -# sudo -u discourse bundle install --standalone - WORKDIR /var/www/discourse ENV LANG en_US.UTF-8 ENTRYPOINT sudo -E -u discourse ruby script/docker_test.rb