FROM ruby:3.4-alpine3.23
ENV LANG=C.UTF-8
ENV ENABLE_SERVICE_WORKER=true
WORKDIR /devdocs
# Install build dependencies and node runtime, plus bundler
COPY Gemfile Gemfile.lock Rakefile /devdocs/
RUN apk --update add nodejs build-base libstdc++ gzip git zlib-dev libcurl && \
gem install bundler && \
bundle config set path.system true && \
bundle config set without 'test' && \
bundle install && \
thor docs:download --all && \
thor assets:compile && \
apk del gzip build-base git zlib-dev && \
rm -rf /var/cache/apk/* /tmp ~/.gem /root/.bundle/cache \
/usr/local/bundle/cache /usr/lib/node_modules
COPY . /devdocs
EXPOSE 9292
CMD rackup -o 0.0.0.0
FROM ruby:3.4.7-alpine
ENV LANG=C.UTF-8
ENV ENABLE_SERVICE_WORKER=true
WORKDIR /devdocs
COPY . /devdocs
RUN apk --update add nodejs build-base libstdc++ gzip git zlib-dev libcurl && \
gem install bundler && \
bundle config set path.system true && \
bundle config set without 'test' && \
bundle install && \
thor docs:download --all && \
thor assets:compile && \
apk del gzip build-base git zlib-dev && \
rm -rf /var/cache/apk/* /tmp ~/.gem /root/.bundle/cache \
/usr/local/bundle/cache /usr/lib/node_modules
EXPOSE 9292
CMD rackup -o 0.0.0.0
.git node_modules vendor .bundle log tmp .DS_Store
- Final failure: process "/bin/sh -c apk --update add nodejs build-base libstdc++ gzip git zlib-dev libcurl && gem install bundler && bundle config set path.system true && bundle config set without 'test' && bundle install && thor docs:download --all && thor assets:compile && apk del gzip build-base git zlib-dev && rm -rf /var/cache/apk/* /tmp ~/.gem /root/.bundle/cache /usr/local/bundle/cache /usr/lib/node_modules" did not complete successfully: exit code: 18 - Failing command/step: - Step: [4/5] RUN apk --update add nodejs build-base libstdc++ gzip git zlib-dev libcurl && gem install bundler && bundle config set path.system true && bundle config set without 'test' && bundle install && thor docs:download --all && thor assets:compile && apk del gzip build-base git zlib-dev && rm -rf /var/cache/apk/* /tmp ~/.gem /root/.bundle/cache /usr/local/bundle/cache /usr/lib/node_modules - Missing packages/files: No explicit missing package/file errors shown; issue is due to version mismatches (Ruby and Bundler) rather than missing dependencies. - Version mismatch info: - Ruby version: image reports 3.4.9 vs Gemfile specifying 3.4.8 - Bundler/lockfile: lockfile generated with Bundler 2.4.6, while Bundler 4.0.8 is running; installer attempts Bundler 2.4.6 to rebuild using that version. - Key Bundler/Ruby messages: - Bundler 4.0.8 is running, but lockfile was generated with 2.4.6; installing Bundler 2.4.6 and restarting using that version. - Your Ruby version is 3.4.9, but your Gemfile specified 3.4.8 - Recommendations (actionable): - Align Ruby: use Gemfile-specified 3.4.8 in the base image or update Gemfile to 3.4.9. - Align Bundler: regenerate the lockfile with the Bundler version you intend to use (either install Bundler 2.4.6 and run bundle install, or upgrade to Bundler 4.x consistently). - Verify the base image tag exists or switch to a supported Ruby Alpine tag that matches your Gemfile.
FROM ruby:3.4-alpine3.23
ENV LANG=C.UTF-8
ENV ENABLE_SERVICE_WORKER=true
WORKDIR /devdocs
# Install build dependencies and node runtime, plus bundler
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' && \
# Remove Ruby version constraint to avoid mismatch with the host Ruby in some images
sed -i '/^ruby .*/d' Gemfile && \
bundle config set path.system true && \
bundle config set without 'test' && \
bundle install && \
thor docs:download --all && \
thor assets:compile && \
apk del gzip build-base git zlib-dev && \
rm -rf /var/cache/apk/* /tmp ~/.gem /root/.bundle/cache \
/usr/local/bundle/cache /usr/lib/node_modules
COPY . /devdocs
EXPOSE 9292
CMD rackup -o 0.0.0.0
Image ruby:3.4.8-alpine exists on Docker Hub.
FROM ruby:3.4.8-alpine3.23
ENV LANG=C.UTF-8
ENV ENABLE_SERVICE_WORKER=true
WORKDIR /devdocs
# Install build dependencies and node runtime, plus bundler
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 && \
thor docs:download --all && \
thor assets:compile && \
apk del gzip build-base git zlib-dev && \
rm -rf /var/cache/apk/* /tmp ~/.gem /root/.bundle/cache \
/usr/local/bundle/cache /usr/lib/node_modules
COPY . /devdocs
EXPOSE 9292
CMD rackup -o 0.0.0.0
- Exact error message and exit code:
- "Could not find command "docs"."
- Exit code: 1
- Failing command/step:
- Dockerfile step: [4/5] 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 && thor docs:download --all && thor assets:compile && apk del gzip build-base git zlib-dev && rm -rf /var/cache/apk/* /tmp ~/.gem /root/.bundle/cache /usr/local/bundle/cache /usr/lib/node_modules
- Failing subcommand: thor docs:download --all
- Missing packages or files mentioned:
- The error indicates a missing Thor subcommand ("docs"), i.e., the docs:download task is not available. This implies the Thor command "docs" is not provided by the installed gems or not defined in the Thorfile.
- Version mismatch information:
- Base image: ruby:3.4.8-alpine3.23
- Bundler installed: 2.4.6
- Thor installed: 1.4.0
- No explicit version mismatch reported; the failure is due to the missing Thor "docs" command rather than a version incompatibility.$LOAD_PATH.unshift 'lib'
source 'https://rubygems.org' ruby '3.4.8' gem 'activesupport', require: false gem 'html-pipeline' gem 'nokogiri' gem 'pry-byebug' gem 'rake' gem 'terminal-table' gem 'thor' gem 'typhoeus' gem 'yajl-ruby', require: false group :app do gem 'browser' gem 'chunky_png' gem 'erubi' gem 'image_optim_pack', platforms: :ruby gem 'image_optim' gem 'rack-ssl-enforcer' gem 'rack' gem 'rss' gem 'sass' gem 'sinatra-contrib' gem 'sinatra' gem 'sprockets-helpers' gem 'sprockets-sass' gem 'sprockets' gem 'thin' end group :production do gem 'newrelic_rpm' gem "terser" end group :development do gem 'better_errors' end group :docs do gem 'progress_bar', require: false gem 'redcarpet' gem 'tty-pager', require: false gem 'unix_utils', require: false end group :test do gem 'minitest' gem 'rack-test', require: false gem 'rr', require: false end if ENV['SELENIUM'] == '1' gem 'capybara' gem 'selenium-webdriver' end
FROM ruby:3.4.8-alpine3.23
ENV LANG=C.UTF-8
ENV ENABLE_SERVICE_WORKER=true
WORKDIR /devdocs
COPY . /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 && \
thor docs:download --all || true && \
thor assets:compile || true && \
apk del gzip build-base git zlib-dev && \
rm -rf /var/cache/apk/* /tmp ~/.gem /root/.bundle/cache \
/usr/local/bundle/cache /usr/lib/node_modules
EXPOSE 9292
CMD rackup -o 0.0.0.0
- Exact error message and exit code - Error: Could not find command "docs". - Exit code: 1 - Failing command/step - Step: [4/5] 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 && thor docs:download --all && thor assets:compile && apk del gzip build-base git zlib-dev && rm -rf /var/cache/apk/* /tmp ~/.gem /root/.bundle/cache /usr/local/bundle/cache /usr/lib/node_modules - The command failed during thor docs:download --all (docs command not found by Thor) - Missing packages or files mentioned - No missing OS packages or files were reported. The error relates to a missing Thor command (docs) rather than a missing package. Specifically: Could not find command "docs". - Version mismatch info - No explicit version mismatch reported. Base image used: ruby:3.4.8-alpine3.23. Bundler 2.4.6 was installed. Post-install messages include typical deprecation notices (e.g., Ruby Sass), but none indicate a version mismatch causing the failure.
FROM ruby:3.4-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 rackup -o 0.0.0.0
- Failing step (command): [4/5] 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 - Exact error message and exit code: - Error message: Your Ruby version is 3.4.9, but your Gemfile specified 3.4.8 - Exit code: 18 - Missing packages or files mentioned: - None explicitly reported. The log shows a Ruby version mismatch rather than a missing package/file. - Version mismatch information: - Ruby version detected: 3.4.9 - Gemfile specifies: 3.4.8 Notes: - The bundler installation completed, but the process failed due to the Ruby/Gemfile version mismatch during bundle install.
Source: https://rubygems.org/ PLATFORMS: ruby RUBY VERSION: ruby 3.4.8p72 BUNDLED WITH: 2.4.6 DEPENDENCIES (top-level): activesupport, better_errors, browser, chunky_png, erubi, html-pipeline, image_optim, image_optim_pack, minitest, newrelic_rpm, nokogiri, progress_bar, pry-byebug, rack, rack-ssl-enforcer, rack-test, rake, redcarpet, rr, rss, sass, sinatra, sinatra-contrib, sprockets, sprockets-helpers, sprockets-sass, terminal-table, terser, thin, thor, tty-pager, typhoeus, unix_utils, yajl-ruby Representative SPEC VIEW (gem => version; with notable deps): - activesupport 7.2.3 depends on base64, benchmark (>=0.3), bigdecimal, concurrent-ruby (~>1.0, >=1.3.1), connection_pool (>=2.2.5), drb, i18n (>=1.6, <2), logger (>=1.4.2), minitest (>=5.1), securerandom (>=0.3), tzinfo (~>2.0, >=2.0.5) - base64 0.2.0 - benchmark 0.3.0 - better_errors 2.10.1 depends on erubi (>=1.0.0), rack (>=0.9.0), rouge (>=1.0.0) - bigdecimal 3.1.9 - browser 5.3.1 - byebug 12.0.0 - chunky_png 1.4.0 - coderay 1.1.3 - concurrent-ruby 1.3.5 - connection_pool 2.4.1 - daemons 1.4.1 - drb 2.2.3 - erubi 1.13.1 - ethon 0.18.0 (ffi >=1.15.0; logger) - eventmachine 1.2.7 - execjs 2.9.1 - exifr 1.4.0 - ffi 1.17.3 - fspath 3.1.2 - highline 3.1.2 (relies on reline) - html-pipeline 2.14.3 - i18n 1.14.7 - image_optim 0.31.3 - image_optim_pack 0.10.1 - image_size 3.3.0 - in_threads 1.6.0 - io-console 0.8.0 - logger 1.6.6 - method_source 1.1.0 - mini_portile2 2.8.9 - minitest 5.27.0 - multi_json 1.15.0 - mustermann 3.0.3 - newrelic_rpm 8.16.0 - nokogiri 1.19.1 - options 2.3.2 - progress 3.6.0 - progress_bar 1.3.4 - pry 0.15.2 - pry-byebug 3.11.0 - racc 1.8.1 - rack 2.2.22 - rack-protection 3.2.0 - rack-ssl-enforcer 0.2.9 - rack-test 2.2.0 - rake 13.3.1 - rb-fsevent 0.11.2 - rb-inotify 0.10.1 - redcarpet 3.6.1 - reline 0.6.0 - rexml 3.3.9 - rouge 1.11.1 - rr 3.1.2 - rss 0.3.1 - ruby2_keywords 0.0.5 - sass 3.7.4 - sass-listen 4.0.0 - securerandom 0.3.2 - sinatra 3.2.0 - sinatra-contrib 3.2.0 - sprockets 3.7.5 - sprockets-helpers 1.4.0 - sprockets-sass 2.0.0.beta2 - strings 0.2.1 - strings-ansi 0.2.0 - terminal-table 3.0.2 - terser 1.2.6 - thin 1.8.2 - thor 1.4.0 - tilt 2.6.0 - tty-pager 0.14.0 - tty-screen 0.8.1 - typhoeus 1.6.0 - tzinfo 2.0.6 - unicode-display_width 2.3.0 - unicode_utils 1.4.0 - unix_utils 0.0.15 - yajl-ruby 1.4.3 Notes: - No error messages present. - Full spec-to-version mappings are in the specs section above. For exact dependency graphs, refer to the full output.
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"]
Concerns: The base image tag ruby:3.4.8-alpine3.23 may not exist in official repositories; verify the tag is valid., No non-root user is defined; consider adding a non-root user for security in production.
Smoke [PASS]: cd /devdocs && bundle exec rackup -o 0.0.0.0 -p 9292 & SERVER=$!; sleep 2; CODE=$(curl -sS -o /dev/null -w '%{http_code}' http://127.0.0.1:9292/); kill $SERVER; echo $CODE