SHARE
TWEET

Dockerfile

a guest Sep 11th, 2014 487 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FROM ubuntu:14.04
  2.  
  3. RUN apt-get update && \
  4.   DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && \
  5.   DEBIAN_FRONTEND=noninteractive apt-get -y install \
  6.     build-essential \
  7.     curl \
  8.     git-core \
  9.     libcurl4-openssl-dev \
  10.     libreadline-dev \
  11.     libssl-dev \
  12.     libxml2-dev \
  13.     libxslt1-dev \
  14.     libyaml-dev \
  15.     zlib1g-dev && \
  16.   curl -O http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz && \
  17.   tar -zxvf ruby-2.1.2.tar.gz && \
  18.   cd ruby-2.1.2 && \
  19.   ./configure --disable-install-doc && \
  20.   make && \
  21.   make install && \
  22.   cd .. && \
  23.   rm -r ruby-2.1.2 ruby-2.1.2.tar.gz && \
  24.   echo 'gem: --no-document' > /usr/local/etc/gemrc
  25.  
  26. RUN /usr/sbin/useradd --create-home --home-dir /home/andrey --shell /bin/bash andrey
  27. RUN /usr/sbin/adduser andrey sudo
  28.  
  29. ADD . /railsapp
  30. ADD consul /bin/
  31. RUN apt-get install -y supervisor
  32.  
  33. ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
  34.  
  35.  
  36. RUN apt-get install -y sqlite3 libsqlite3-dev nodejs dnsmasq
  37. RUN gem install bundler
  38. RUN cd /railsapp && bundle install && bundle exec rake db:migrate
  39.  
  40. ADD user-products.json /etc/consul.d/user-products.json
  41. ADD dnsmasq-consul /etc/dnsmasq.d/10-consul
  42. ADD dnsmasq.conf /etc/dnsmasq.conf
  43.  
  44. EXPOSE 3000 8500
  45. CMD ["/usr/bin/supervisord"]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top