mirror-web/Dockerfile.build
Harry Chen 49e90b7533
Upgrade to ruby 3.2 in build Docker image
Signed-off-by: Harry Chen <harry-chen@outlook.com>
2023-11-01 15:11:17 +08:00

20 lines
586 B
Docker

FROM ruby:3.2
RUN mkdir /data
WORKDIR /data
RUN apt-get update
RUN curl -fsSL "https://cdn.jsdelivr.net/gh/tj/n@7.3.0/bin/n#v14.17.1" | bash -s -- lts
COPY Gemfile /data/
RUN gem install bundler
RUN bundle install
# Fix https://github.com/babel/ruby-babel-transpiler/issues/294
RUN sed -i 's/@context ||= ExecJS.compile("var self = this; " + File.read(script_path))/@context ||= ExecJS.compile("var self = this; " + File.read(script_path, :encoding => "UTF-8"))/' /usr/local/bundle/gems/babel-transpiler-0.7.0/lib/babel/transpiler.rb
ENV LANG en_US.UTF-8
CMD ["jekyll", "build"]