Build image for applications using JRuby and yarn/NodeJS, e.g. Rails with webpacker.
10K+
Build image for applications using JRuby and yarn/NodeJS, e.g. Rails with webpacker.
Currently, the supported versions are:
The JRuby version determines the version of the Docker image.
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
Content type
Image
Digest
Size
237.3 MB
Last updated
almost 8 years ago
docker pull awesomeinc/jruby-yarn:9.1.17