File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM ruby:4.0.1 AS base
2+
3+ RUN bundle config set frozen 'true' && \
4+ bundle config set path '/vendor/bundle'
5+
6+ WORKDIR /usr/src/app
7+
8+ COPY Gemfile Gemfile.lock ./
9+ RUN bundle install
10+
11+ COPY . .
12+
13+ FROM base AS build-step
14+ RUN bundle exec jekyll build
15+
16+ FROM scratch AS build
17+ COPY --from=build-step /usr/src/app/_site /
18+
19+ FROM base AS server
20+ EXPOSE 4000
21+ CMD bundle exec jekyll serve --host 0.0.0.0 --port 4000 --destination /tmp/_site
Original file line number Diff line number Diff line change 1+ .PHONY : all build serve clean
2+
3+ all : build
4+
5+ build : clean
6+ docker buildx build . --target build --output type=local,dest=./_site
7+
8+ serve :
9+ docker compose up --build
10+
11+ clean :
12+ rm -rf _site
13+
14+ fmt :
15+ npm run format:fix
16+
17+ lint :
18+ npm run lint:fix
19+
20+ spellcheck :
21+ npm run spellcheck:staged
Original file line number Diff line number Diff line change 1+ services :
2+ jekyll :
3+ build :
4+ context : .
5+ target : server
6+ volumes :
7+ - " ./:/usr/src/app"
8+ ports :
9+ - " 4000:4000"
You can’t perform that action at this time.
0 commit comments