-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (20 loc) · 708 Bytes
/
Copy pathDockerfile
File metadata and controls
28 lines (20 loc) · 708 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
FROM ruby:3.0.2
ENV APP_PATH /var/app
ENV BUNDLE_VERSION 2.3.5
ENV RAILS_PORT 3000
ENV BUNDLE_PATH /usr/local/bundle
ENV GEM_PATH /usr/local/bundle
ENV GEM_HOME /usr/local/bundle
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client
RUN gem install bundler --version "$BUNDLE_VERSION"
WORKDIR $APP_PATH
COPY Gemfile Gemfile.lock ./
RUN bundle check || bundle install --jobs 20 --retry 5
COPY . .
# Add a script to be executed every time the container starts.
COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
EXPOSE 3000
# Configure the main process to run when running the image
CMD ["rails", "server", "-b", "0.0.0.0", "-p", $RAILS_PORT]