-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
36 lines (29 loc) · 1015 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
FROM jruby:9-alpine
MAINTAINER seo.cahill@gmail.com
# Install apt based dependencies required to run Rails as
# well as RubyGems. As the Ruby image itself is based on a
# Debian image, we use apt-get to install those.
# RUN apt-get update && apt-get install -y \
# build-essential \
# nodejs
# Configure the main working directory. This is the base
# directory used in any further RUN, COPY, and ENTRYPOINT
# commands.
RUN mkdir -p /app
WORKDIR /app
# Copy the Gemfile as well as the Gemfile.lock and install
# the RubyGems. This is a separate step so the dependencies
# will be cached unless changes to one of those two files
# are made.
RUN apk update && apk add nodejs
COPY Gemfile ./
# RUN apk --update add --virtual build_deps \
# build-base ruby-dev libc-dev linux-headers \
# libressl-dev libxml2-dev libxslt-dev \
# apk del build_deps
RUN gem install bundler && bundle install --jobs 20 --retry 5
# Copy the main application.
COPY . ./
EXPOSE 4567
ENTRYPOINT ["jruby"]
CMD ["app.rb"]