-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
31 lines (21 loc) · 765 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
FROM ruby:3.3.2-bookworm
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
postgresql-client postgresql-contrib libpq-dev build-essential \
libxml2-dev libxslt-dev
LABEL maintainer="Aaron Collier <aaron.collier@stanford.edu>"
RUN mkdir /app
WORKDIR /app
# Using argument for conditional setup in conf file
ARG RAILS_ENV
ENV RAILS_ENV $RAILS_ENV
ARG BUNDLE_GEMS__CONTRIBSYS__COM
ENV BUNDLE_GEMS__CONTRIBSYS__COM $BUNDLE_GEMS__CONTRIBSYS__COM
RUN gem update --system && \
gem install bundler && \
bundle config build.nokogiri --use-system-libraries
COPY Gemfile Gemfile.lock ./
RUN bundle install
COPY . .
EXPOSE 3000
CMD ["bundle", "exec", "puma", "-C", "config/puma.rb"]