jglovier / resume-template

:page_facing_up::briefcase::tophat: A simple Jekyll + GitHub Pages powered resume template.
http://resume-template.joelglovier.com
MIT License
1.85k stars 1.75k forks source link

Can I've a Docker file for this project? #134

Closed iamrobins closed 2 years ago

iamrobins commented 2 years ago

I've Ubuntu 22 and it has Ruby 3 and this project supports Ruby 2. I don't have any experience in Ruby so while installing I was having this error, I tried doing some tweaks to Gem file but didn't work.

Fetching commonmarker 0.17.13
Installing commonmarker 0.17.13 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/usr/local/bundle/gems/commonmarker-0.17.13/ext/commonmarker
/usr/local/bin/ruby -I /usr/local/lib/ruby/2.7.0 -r
./siteconf20220623-1-152k5yh.rb extconf.rb
creating Makefile

current directory: /usr/local/bundle/gems/commonmarker-0.17.13/ext/commonmarker
make "DESTDIR=" clean
sh: make: not found

current directory: /usr/local/bundle/gems/commonmarker-0.17.13/ext/commonmarker
make "DESTDIR="
sh: make: not found

make failed, exit code 127

Gem files will remain installed in /usr/local/bundle/gems/commonmarker-0.17.13
for inspection.
Results logged to
/usr/local/bundle/extensions/x86_64-linux-musl/2.7.0/commonmarker-0.17.13/gem_make.out

An error occurred while installing commonmarker (0.17.13), and Bundler cannot
continue.
Make sure that `gem install commonmarker -v '0.17.13' --source
'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  github-pages was resolved to 204, which depends on
    jekyll-commonmark-ghpages was resolved to 0.1.6, which depends on
      jekyll-commonmark was resolved to 1.3.1, which depends on
        commonmarker
The command '/bin/sh -c bundle install' returned a non-zero code: 5

This is the Dockerfile I was trying to make.

FROM ruby:2-alpine

WORKDIR /app

COPY . /app

RUN bundle install

CMD [ "bundle", "exec", "jekyll", "serve" ]
jglovier commented 2 years ago

Hi @iamrobins! 👋 Thanks for opening this issue. A dockerfile sounds like a great idea, but unfortunately I don't really have any experience configuring docker for projects and I won't have any development time for this project in which I could learn Docker and contribute what you asking myself in the foreseeable future.

Would you like to contribute the solution yourself? I'll be happy to review and test a PR for it if you take the time to do so! 🙂

iamrobins commented 2 years ago

Yeah definitely, I've created a Dockerfile with Ruby 3.0 because older ruby versions were not working for me. Are you planning to upgrade the project to Ruby 3.0 with a new Gemfile.lock ?

I found the fix to run it on Ruby 3.0 in this issue https://github.com/jglovier/resume-template/issues/112

iamrobins commented 2 years ago

Hi @jglovier now there is no need to upgrade the project to Ruby 3.0 I have created the Dockerfile which works perfectly with the current state of the project. I've made a PR with 2 lines of instructions in the README. please take a look when you get time.

jglovier commented 2 years ago

Thanks again, @iamrobins!! Resolved by #135.

jglovier commented 2 years ago

jiggy