forked from diaspora/diaspora
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Dockerfile
55 lines (47 loc) · 1.58 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM debian:jessie
MAINTAINER Shrikrishna Holla <[email protected]>
RUN apt-get update && apt-get install -y --fix-missing \
build-essential \
libssl-dev \
libcurl4-openssl-dev \
libxml2-dev \
libxslt-dev \
imagemagick \
ghostscript \
git \
cmake \
curl \
libpq-dev \
libmagickwand-dev \
nodejs \
gawk \
libreadline6-dev \
libyaml-dev \
libsqlite3-dev \
sqlite3 \
autoconf \
libgdbm-dev \
libgmp-dev \
libncurses5-dev \
automake \
bison \
libffi-dev \
&& apt-get -y install --fix-missing \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*; \
adduser --disabled-login --gecos "" diaspora; mkdir /diaspora;
USER diaspora
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
RUN \curl -sSL https://get.rvm.io | bash -s stable
RUN /bin/bash -l -c 'source "$HOME/.rvm/scripts/rvm" && rvm autolibs read-fail && rvm install 2.2.1'
COPY . /home/diaspora/diaspora
USER root
RUN /bin/bash -l -c "chown -R diaspora /home/diaspora"
USER diaspora
WORKDIR /home/diaspora/diaspora
ENV DB=postgres RAILS_ENV=production
# VOLUME /home/diaspora/diaspora/config/database.yml /home/diaspora/diaspora/config/diaspora.yml
EXPOSE 3000
RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc && bundle install --without test development --with postgresql"
ONBUILD RUN /bin/bash -l -c "rake assets:precompile" # if you want to build downstream, assume diaspora.yml already exists
CMD ['/bin/bash', '-l, '-c', '"bundle exec unicorn -c config/unicorn.rb"']