-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (36 loc) · 905 Bytes
/
Dockerfile
File metadata and controls
50 lines (36 loc) · 905 Bytes
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
FROM ruby:3.2.4-alpine AS builder
RUN apk add --no-cache \
tzdata \
git \
build-base \
libpq-dev \
make \
nodejs \
postgresql-client \
libc6-compat
WORKDIR /tmp
COPY Gemfile Gemfile.lock ./
RUN gem install bundler:2.4.13
RUN bundle config set frozen false
ARG BUNDLE_WITHOUT=""
RUN bundle install --jobs=8
# runtime
FROM ruby:3.2.4-alpine
RUN apk add --no-cache \
tzdata \
libpq \
postgresql-client \
nodejs \
libc6-compat \
build-base
ARG RAILS_ENV=production
ENV RAILS_ENV=${RAILS_ENV}
RUN gem install dotenv -v 3.1.4
COPY docker-entry.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entry.sh
COPY --from=builder /usr/local/bundle /usr/local/bundle
COPY . /var/www/api-quequeo/current/
WORKDIR /var/www/api-quequeo/current
EXPOSE 3000
ENTRYPOINT ["/usr/local/bin/docker-entry.sh"]
CMD ["./bin/rails", "server", "-b", "0.0.0.0"]