move back to ruby 3.1 (#83)

* move back to ruby 3.1
* gem system update and fixing local builds
* fixing 2nd build, adding ignore
* adding dockerignore
This commit is contained in:
Bret Fisher
2023-03-07 02:06:14 -05:00
committed by GitHub
parent 61a2d58cc3
commit 2119a31476
4 changed files with 10 additions and 5 deletions

5
.dockerignore Normal file
View File

@@ -0,0 +1,5 @@
.jekyll-cache
_site
.github
.git
README.md

View File

@@ -58,7 +58,7 @@ jobs:
needs: build-jekyll-image needs: build-jekyll-image
if: github.event_name == 'push' # if: github.event_name == 'push'
permissions: permissions:
contents: read contents: read

2
.gitignore vendored
View File

@@ -1,3 +1,3 @@
.jekyll-cache
# this repo only builds a docker image for jekyll, and doesn't store a jekyll site. # this repo only builds a docker image for jekyll, and doesn't store a jekyll site.
_site _site

View File

@@ -1,4 +1,4 @@
FROM ruby:3-slim-bullseye as jekyll FROM ruby:3.1-slim-bullseye as jekyll
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \ build-essential \
@@ -8,7 +8,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# used in the jekyll-server image, which is FROM this image # used in the jekyll-server image, which is FROM this image
COPY docker-entrypoint.sh /usr/local/bin/ COPY docker-entrypoint.sh /usr/local/bin/
RUN gem install bundler jekyll RUN gem update --system && gem install jekyll && gem cleanup
EXPOSE 4000 EXPOSE 4000
@@ -19,7 +19,7 @@ ENTRYPOINT [ "jekyll" ]
CMD [ "--help" ] CMD [ "--help" ]
# build from the image we just built with different metadata # build from the image we just built with different metadata
FROM ghcr.io/bretfisher/jekyll:latest as jekyll-serve FROM jekyll as jekyll-serve
# on every container start, check if Gemfile exists and warn if it's missing # on every container start, check if Gemfile exists and warn if it's missing
ENTRYPOINT [ "docker-entrypoint.sh" ] ENTRYPOINT [ "docker-entrypoint.sh" ]