Files
blog.pixx.cz/Dockerfile
David Zálešák 9f5e19c806
All checks were successful
Build and Deploy / build (push) Successful in 32s
CI: speed up build
2026-05-08 22:00:28 +00:00

25 lines
657 B
Docker

# --- Stage 1: Build & Test ---
FROM ruby:3.3 AS builder
# Instalace závislostí pro html-proofer (pokud jsou potřeba)
RUN apt-get update && apt-get install -y build-essential
WORKDIR /srv/jekyll
COPY Gemfile* ./
RUN bundle install
COPY . .
# Samotný build webu
RUN JEKYLL_ENV=production bundle exec jekyll build
# TEST: Pokud htmlproofer skončí chybou, celý Docker build selže
RUN bundle exec htmlproofer ./_site \
--disable-external \
--ignore-urls "/^http:\/\/127.0.0.1/,/^http:\/\/0.0.0.0/,/^http:\/\/localhost/"
# --- Stage 2: Final Image ---
FROM nginx:alpine
COPY --from=builder /srv/jekyll/_site /usr/share/nginx/html
EXPOSE 80