mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-26 05:02:48 +00:00
28 lines
672 B
Docker
28 lines
672 B
Docker
FROM ruby:3.2
|
|
LABEL maintainer="Miao Wang <shankerwangmiao@gmail.com>"
|
|
|
|
RUN mkdir /data
|
|
WORKDIR /data
|
|
|
|
RUN \
|
|
apt-get update && \
|
|
apt-get install --no-install-recommends -y locales && \
|
|
apt-get clean
|
|
RUN curl -fsSL "https://cdn.jsdelivr.net/gh/tj/n/bin/n" | bash -s -- lts
|
|
|
|
COPY Gemfile Gemfile.lock package.json package-lock.json /data/
|
|
COPY _node_module_patch /data/_node_module_patch
|
|
|
|
RUN \
|
|
gem install bundler && \
|
|
bundle install --frozen && \
|
|
NODE_ENV=production npm ci && \
|
|
mv node_modules ../ && \
|
|
rm -rf /data/*
|
|
|
|
ENV LANG C.UTF-8
|
|
ENV JEKYLL_ENV production
|
|
ENV VITE_RUBY_VITE_BIN_PATH /node_modules/.bin/vite
|
|
|
|
CMD ["jekyll", "build"]
|