-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 744 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 744 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
FROM ruby:2.5-alpine
ENV BUILD_PACKAGES="curl-dev ruby-dev build-base" \
DEV_PACKAGES="zlib-dev libxml2-dev libxslt-dev tzdata yaml-dev sqlite-dev" \
RUBY_PACKAGES="ruby-json yaml nodejs"
RUN apk update && \
apk upgrade && \
apk add --no-cache --update\
$BUILD_PACKAGES \
$DEV_PACKAGES \
$RUBY_PACKAGES && \
mkdir -p /usr/src/myapp
WORKDIR /usr/src/myapp
COPY Gemfile ./
RUN gem install bundler -v 2.3.26
RUN bundle config build.nokogiri --use-system-libraries && \
bundle install --jobs=4 --retry=10
COPY . ./
RUN chmod +x bin/rails
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["bin/rails", "s", "-b", "0.0.0.0"]