-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (41 loc) · 1.38 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
ARG RUBY_VERSION
FROM ruby:$RUBY_VERSION-slim
RUN apt-get update -qq\
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends\
build-essential\
gnupg2\
curl\
less\
git\
&& apt-get clean\
&& rm -rf /var/cache/apt/archives/*\
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*\
&& truncate -s 0 /var/log/*log
ARG NODE_MAJOR_VERSION
RUN curl -sL https://deb.nodesource.com/setup_$NODE_MAJOR_VERSION.x | bash -
RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get -yq dist-upgrade &&\
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends\
nodejs\
&& apt-get clean\
&& rm -rf /var/cache/apt/archives/*\
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*\
&& truncate -s 0 /var/log/*log
RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get -yq dist-upgrade &&\
DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends\
&& apt-get clean\
&& rm -rf /var/cache/apt/archives/*\
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*\
&& truncate -s 0 /var/log/*log
ARG APP_HOME
ARG BUNDLE_JOBS
RUN mkdir -p $APP_HOME
WORKDIR $APP_HOME
COPY Gemfile* $APP_HOME/
ENV BUNDLER_VERSION 2.4.20
RUN gem update --system \
&& gem install bundler -v $BUNDLER_VERSION \
&& bundle install -j 4
RUN bundle install
COPY . .
EXPOSE 3000
CMD ["rails", "server", "-b", "0.0.0.0"]