-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
47 lines (39 loc) · 1.18 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
FROM ruby:3.1-slim
LABEL maintainer="[email protected]"
RUN apt-get update -yqq && \
DEBIAN_FRONTEND=noninteractive apt-get install -yqq --no-install-recommends \
automake \
autoconf \
build-essential \
curl \
default-libmysqlclient-dev \
git \
gnupg \
libreadline-dev \
libxml2-dev \
libxslt1-dev \
libyaml-dev \
nodejs \
vim \
zlib1g \
zlib1g-dev \
&& 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 curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y yarn \
&& apt-get clean \
&& rm -rf /var/cache/apt/archives/* \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& truncate -s 0 /var/log/*log
# Throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
COPY Gemfile* package.json yarn.lock /app/
WORKDIR /app
RUN bundle install --jobs=4 --retry=3
RUN yarn install
COPY . /app/
CMD ["./bin/rails", "s", "-b", "0.0.0.0"]