-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
39 lines (25 loc) · 789 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
35
36
37
38
39
FROM ruby:3.3.3-alpine AS base
LABEL org.opencontainers.image.source https://github.com/rouge-ruby/dingus
RUN apk add --update --no-cache \
nodejs=20.13.1-r0 \
&& rm -rf /var/cache/apk/*
# ---------------------------------
# This stage is responsible for installing gems
FROM base as dep
RUN apk add --no-cache \
build-base=0.5-r3
WORKDIR /app
COPY Gemfile Gemfile.lock ./
# Install core dependencies
RUN bundle config --local without development && \
bundle install --jobs=3 --retry=3
# ---------------------------------
# This stage is what we run the app
FROM base
RUN adduser -D app
USER app
WORKDIR /app
COPY --from=dep /usr/local/bundle /usr/local/bundle
COPY --chown=app . ./
EXPOSE 9292
CMD ["bundle", "exec", "rackup", "-o", "0.0.0.0", "-p", "9292"]