-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
35 lines (26 loc) · 813 Bytes
/
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
FROM ruby:3.0.1-alpine
LABEL maintainer="thibaut.poullain@ydrazil.fr"
ENV LANG=C.UTF-8
RUN apk add --no-cache \
build-base \
postgresql-dev \
git \
nodejs \
yarn \
tzdata
WORKDIR /app
COPY package.json yarn.lock /app/
RUN yarn install --frozen-lockfile
COPY Gemfile* /app/
RUN gem install bundler -v '~> 2.2.15' && \
bundle config build.nokogiri --use-system-libraries && \
bundle lock --add-platform x86_64-linux-musl && \
bundle config unset frozen && \
bundle check || bundle install -j4 --retry 3 && \
bundle clean --force && \
rm -rf /usr/local/bundle/cache/*.gem && \
find /usr/local/bundle/gems/ -name "*.c" -delete && \
find /usr/local/bundle/gems/ -name "*.o" -delete
COPY . /app
EXPOSE 3000
CMD bundle exec rails s -b 0.0.0.0