-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-development
43 lines (30 loc) · 1.28 KB
/
Dockerfile-development
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
# Use phusion/baseimage as base image.
FROM phusion/baseimage:0.9.22
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
RUN add-apt-repository -y ppa:brightbox/ruby-ng
RUN apt-get update
RUN apt-get install -y libpq-dev git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs wget autoconf tzdata ruby2.4 ruby2.4-dev rubygems-integration ruby-switch
RUN ruby-switch --set ruby2.4
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN rm -rf /var/lib/gems/2.4.1/cache/*
RUN adduser --disabled-password --gecos "" user_golf_stats
#RUN mkdir /golf_stats
#WORKDIR /golf_stats
WORKDIR /usr/src/app
COPY Gemfile* ./
#ADD Gemfile /golf_stats/Gemfile
#ADD Gemfile.lock /golf_stats/Gemfile.lock
RUN chown -R user_golf_stats:user_golf_stats .
#USER user_golf_stats
#WORKDIR /golf_stats
#RUN echo "gem: --user-install --env-shebang --no-rdoc --no-ri" > /home/user_golf_stats/.gemrc
#ENV PATH /home/user_golf_stats/.gem/ruby/2.4.0/bin:$PATH
#ENV GEM_HOME /home/user_golf_stats/.gem/ruby/2.4.0
RUN gem install bundler
RUN gem install rake
#RUN bundle update
RUN bundle install
COPY . .
#RUN RAILS_ENV=production bundle exec rake assets:precompile
#ADD . /golf_stats