Skip to content

Instantly share code, notes, and snippets.

@eliotjordan
Created March 18, 2015 18:35
Show Gist options
  • Save eliotjordan/116e05a64c499eb2b3a7 to your computer and use it in GitHub Desktop.
Save eliotjordan/116e05a64c499eb2b3a7 to your computer and use it in GitHub Desktop.
geoblacklight-docker
FROM ubuntu:14.04
MAINTAINER Eliot Jordan <[email protected]>
RUN apt-get update && apt-get -y install \
unzip \
wget \
git \
curl \
libpq-dev \
postgresql-client \
mysql-client \
libmysqlclient-dev \
libsqlite3-dev \
sqlite3 \
build-essential \
make \
libcurl4-openssl-dev \
libreadline-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev \
libyaml-dev \
zlib1g-dev \
git-core \
software-properties-common \
python-software-properties \
libgdbm-dev \
libncurses5-dev \
automake \
libtool \
bison \
libffi-dev
# Install ruby
RUN curl -O http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz && \
tar -zxvf ruby-2.1.2.tar.gz && \
cd ruby-2.1.2 && \
./configure --disable-install-doc && \
make && \
make install && \
cd .. && \
rm -r ruby-2.1.2 ruby-2.1.2.tar.gz && \
echo 'gem: --no-ri --no-rdoc' > /usr/local/etc/gemrcdoc
# Install java
RUN apt-get -y install openjdk-7-jdk && \
mkdir /usr/java && \
ln -s /usr/lib/jvm/java-7-openjdk-amd64 /usr/java/default
# Install rails and gems
RUN gem install bundler && \
gem install --no-ri --no-rdoc rails --version=4.2.0 && \
gem install scss-lint
# Install nodejs and packages
RUN apt-add-repository ppa:chris-lea/node.js -y && \
apt-get update -y && \
apt-get install nodejs -y && \
npm install -g bower && \
npm install -g grunt-cli && \
npm install -g gulp && \
npm install -g phantomjs
# Install unicorn
RUN gem install unicorn && \
mkdir /var/www /var/www/gbl /var/www/gbl/pids /var/www/gbl/log/
# Preload gems
RUN git clone https://github.com/geoblacklight/geoblacklight.git && \
cd geoblacklight && \
bundle install && \
rake engine_cart:generate && \
cd .. && \
rm -r geoblacklight
# Add scripts and config files
RUN mkdir /usr/scripts
ADD . /usr/scripts
# Add default env variable referencing our solr container
# Depends on --link my_solr_container:solr
ENV SOLR_URL http://solr:8983/solr
EXPOSE 3000
WORKDIR /usr/scripts
CMD ["/bin/bash"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment