Sign inSign up

awesomeinc/jruby-yarn

By awesomeinc

Updated almost 8 years ago

Build image for applications using JRuby and yarn/NodeJS, e.g. Rails with webpacker.

Image
0

10K+

awesomeinc/jruby-yarn repository overview

jruby-yarn

Build status GitHub issues GitHub stars

Build image for applications using JRuby and yarn/NodeJS, e.g. Rails with webpacker.

dockeri.co

Versions

Currently, the supported versions are:

  • JRuby 9.1.17
  • NodeJS 8.9.3
  • Yarn 1.3.2

The JRuby version determines the version of the Docker image.

Usage

Basic example Dockerfile for a Rails-App using webpacker and JRuby.

FROM awesomeinc/jruby-yarn:9.1.17

ENV RAILS_ENV production
ENV NODE_ENV production

ENV APP /usr/src/app

RUN mkdir -p $APP
WORKDIR $APP

# copy Gemfile and Gemfile.lock
COPY Gemfile* $APP/

# copy vendored gems
COPY vendor/cache $APP/vendor/cache/

RUN bundle --version
RUN bundle install --local --deployment

COPY . $APP     

RUN rake assets:precompile

# JRUBY_OPTS: debug for coverage, urandom for fast integration tests
RUN export RAILS_ENV=test && \
  export JRUBY_OPTS="-Xcli.debug=true --debug -J-Djava.security.egd=file:/dev/./urandom" && \
  rake test:coverage

EXPOSE 8080

CMD rake db:migrate && rm -f /tmp/pids/server.pid && rails server -p 8080 -b 0.0.0.0

Tag summary

Content type

Image

Digest

Size

237.3 MB

Last updated

almost 8 years ago

docker pull awesomeinc/jruby-yarn:9.1.17