-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (27 loc) · 1.07 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM ubuntu:wily
MAINTAINER "Pedro Cesar" <pedro.azevedo@concretesolutions.com.br>
EXPOSE 4567
# INSTALL BASE TOOLS
RUN apt-get update
RUN apt-get install -y --force-yes build-essential curl git nodejs
RUN apt-get install -y --force-yes zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt-dev
RUN apt-get clean
# INSTALL AND CONFIGURE RUBY
RUN git clone https://github.com/sstephenson/rbenv.git /root/.rbenv
RUN git clone https://github.com/sstephenson/ruby-build.git /root/.rbenv/plugins/ruby-build
RUN /root/.rbenv/plugins/ruby-build/install.sh
ENV PATH /root/.rbenv/shims:/root/.rbenv/bin:$PATH
RUN echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh # or /etc/profile
RUN echo 'eval "$(rbenv init -)"' >> .bashrc
ENV CONFIGURE_OPTS --disable-install-doc
RUN rbenv install 2.1.0
RUN rbenv global 2.1.0
RUN gem install --no-ri --no-rdoc bundler
# CONFIGURE BASE APPLICATION
RUN mkdir -p /app/slate
ADD slate/ /app/slate/
RUN cd /app/slate/; bundle install
WORKDIR /app/slate
# BOOTSTRAP
ONBUILD ADD . /app/source/slate
CMD ["bundle", "exec", "middleman", "server"]