Dockerfile22 lines · 611 chars FROM ruby:3.4.8-alpine3.23
ENV LANG=C.UTF-8
ENV ENABLE_SERVICE_WORKER=true
WORKDIR /devdocs
# Install build dependencies and Node.js runtime
COPY Gemfile Gemfile.lock Rakefile /devdocs/
RUN apk --update add nodejs build-base libstdc++ gzip git zlib-dev libcurl && \
gem install bundler -v '2.4.6' && \
bundle config set path.system true && \
bundle config set without 'test' && \
bundle install && \
rm -rf /var/cache/apk/* /tmp ~/.gem /root/.bundle/cache \
/usr/local/bundle/cache /usr/lib/node_modules
COPY . /devdocs
EXPOSE 9292
CMD ["bundle", "exec", "rackup", "-o", "0.0.0.0"]