forked from brave-intl/publishers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
54 lines (47 loc) · 1.17 KB
/
Dockerfile.dev
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
FROM ruby:2.7.2-alpine
RUN apk add --update --no-cache \
bash \
binutils-gold \
build-base \
curl \
file \
g++ \
gcc \
git \
less \
libstdc++ \
libffi-dev \
libc-dev \
linux-headers \
libxml2-dev \
libxslt-dev \
libgcrypt-dev \
make \
netcat-openbsd \
openssl \
pkgconfig \
postgresql-dev \
tzdata \
yarn
RUN gem install bundler
WORKDIR /var/www/
# We are copying the Gemfile first, so we can install
# all the dependencies without any issues
# Rails will be installed once you load it from the Gemfile
# This will also ensure that gems are cached and only updated when they change.
COPY Gemfile ./
COPY Gemfile.lock ./
COPY package.json yarn.lock ./
# Install the gems.
RUN bundle config build.nokogiri --use-system-libraries
RUN bundle check || bundle install --jobs 20 --retry 5
RUN yarn cache clean
RUN yarn install --verbose
# We copy all the files from the current directory to our
# /app directory
# Pay close attention to the dot (.)
# The first one will select ALL The files of the current directory,
# The second dot will copy it to the WORKDIR!
COPY . .
EXPOSE 3000
CMD ["bundle", "exec", "rails","server","-b","0.0.0.0","-p","3000"]