Closed ajaysjournal closed 3 years ago
I've used the Jekyll Docker images before: https://github.com/envygeeks/jekyll-docker
Based on your error message Could not find execjs-2.7.0 in any of the sources
it looks like kramdown-math-katex
is the problem though. Have you tried removing it from the Gemfile? More on math support here: https://hydejack.com/docs/config/#enabling-math-blocks
@qwtel - Thanks, I will try your suggestion. Already started using docker-compose
, and just don't want to fix on current system.
Couple of times I faced env issue, I suggest this feature. Now the app is running on docker, also mounted the local volume to docker, so that it will dynamically builds the site when host files changed. Everything looks perfect in docker world :)
execute touch Dockerfile
and add below contents to it.
FROM ajaycs14/hydejack-base:latest
EXPOSE 4000
WORKDIR /code
COPY starter-kit .
RUN git init
ENV JEKYLL_ENV=production
RUN bundle install
CMD [ "bundle", "exec", "jekyll", "serve", "--force_polling", "-H", "0.0.0.0", "-P", "4000", "--watch"]
execute touch docker-compose.yml
and add below contents to it.
version: '2.4'
services:
blog:
build: .
volumes:
- ./starter-kit:/code
ports:
- '24230:4000'
docker-compose build
docker-compose up
docker-compose down
I added this on Gemfile, for some reasons I was not able to find JS runtime container env, some quick google search got fixed it.
gem "kramdown-math-katex" # add beloow 2 lines on gemfile
gem 'execjs'
gem 'therubyracer', :platforms => :ruby
The latest/pro version requires ruby 2.7 or above(correct me if I am wrong), for some reasons I dont want to upgrade ruby version, which might break other ruby projects. It would be great and easy, if we have docker version of Hyde jack. Just added a my version of Docker file below.
How to run it ?
Issue