-
-
Notifications
You must be signed in to change notification settings - Fork 631
/
Dockerfile
23 lines (18 loc) · 721 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
FROM jruby:9.2-jdk
RUN apt-get update -qq && apt-get install -y build-essential git \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc
ENV GEM_HOME /usr/local/bundle
ENV PATH $GEM_HOME/bin:$PATH
RUN gem install bundler -v '< 2' \
&& bundle config --global path "$GEM_HOME" \
&& bundle config --global bin "$GEM_HOME/bin"
# don't create ".bundle" in all our apps
ENV BUNDLE_APP_CONFIG $GEM_HOME
WORKDIR /app
EXPOSE 9292
CMD ["jruby", "-G", "-r", "jbundler", "-S", "rackup", "-o", "0.0.0.0", "config.ru"]
# these didn't work as ONBUILD, strangely. Idk why. -JBM
COPY Gemfile Gemfile.lock Jarfile Jarfile.lock ./
RUN bundle install && jruby -S jbundle install
COPY . .