aksakalli / jekyll-doc-theme

Jekyll theme for creating project documentation websites
https://aksakalli.github.io/jekyll-doc-theme/
MIT License
289 stars 257 forks source link

Docker instalation fail #58

Open mdlugosz-agh opened 1 year ago

mdlugosz-agh commented 1 year ago

[builder 6/8] RUN bundle install:

0 0.762 Bundler 2.4.7 is running, but your lockfile was generated with 2.2.31. Installing Bundler 2.2.31 and restarting using that version.

0 2.170 Fetching gem metadata from https://rubygems.org/.

0 2.233 Fetching bundler 2.2.31

0 2.560 Installing bundler 2.2.31

0 2.917 Calling DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please callDidYouMean.correct_error(error_name, spell_checker)' instead.

0 4.216 Fetching gem metadata from https://rubygems.org/.........

0 9.698 Resolving dependencies...

0 9.960 nokogiri-1.13.6-x86_64-linux requires ruby version < 3.2.dev, >= 2.6, which is

0 9.960 incompatible with the current version, ruby 3.2.1p31


Dockerfile:12

10 | WORKDIR /jekyll 11 | ADD Gemfile Gemfile.lock ./ 12 | >>> RUN bundle install 13 |
14 | ADD . .

ERROR: failed to solve: process "/bin/sh -c bundle install" did not complete successfully: exit code: 5

eyespore commented 2 weeks ago

Hi! I got a same issue with you recently, the stack trace probably means a incompatible version problem, you can try modifying the version of ruby docker image, for me the version 3.1-alpine3.18 works well

here's my docker compose file:

ARG JEKYLL_BASEURL=''

####################################

FROM ruby:3.1-alpine3.18 AS builder

RUN apk add --no-cache make build-base
RUN gem install bundler

WORKDIR /jekyll
ADD Gemfile Gemfile.lock ./
RUN bundle install

ADD . .
ARG JEKYLL_BASEURL
RUN bundle exec jekyll build --baseurl $JEKYLL_BASEURL

####################################

FROM nginx:alpine

ARG JEKYLL_BASEURL
COPY --from=builder /jekyll/_site /usr/share/nginx/html/$JEKYLL_BASEURL
COPY nginx.conf /etc/nginx/nginx.conf

EXPOSE 80