From c8846653b38c1dd4e3216ce6ece067d5153e1287 Mon Sep 17 00:00:00 2001 From: JV conseil Date: Fri, 25 Aug 2023 15:46:30 +0200 Subject: [PATCH 01/29] ruby:3.1.4-alpine3.18 Update base_image from ruby:3.1.1-alpine3.15 to ruby:3.1.4-alpine3.18 --- opts.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opts.yml b/opts.yml index 465b630..c207869 100644 --- a/opts.yml +++ b/opts.yml @@ -1,4 +1,4 @@ -base_image: ruby:3.1.1-alpine3.15 +base_image: ruby:3.1.4-alpine3.18 user: jekyll aliases: latest: 4.2.2 From c705bcb872a0749b70c41c7a808adb4725c48a8f Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Fri, 25 Aug 2023 15:50:13 +0200 Subject: [PATCH 02/29] Markdown formatting --- README.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e9f1e22..95b00b5 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ -[![Github Workflow Status](https://img.shields.io/github/workflow/status/envygeeks/jekyll-docker/Push?style=for-the-badge)](https://github.com/envygeeks/jekyll-docker/actions) [![Donate](https://img.shields.io/badge/DONATE-MONEY-yellow.svg?style=for-the-badge)](https://envygeeks.io#donate) [![Docker Stars](https://img.shields.io/docker/stars/jekyll/jekyll.svg?style=for-the-badge)]() [![Docker Pulls](https://img.shields.io/docker/pulls/jekyll/jekyll.svg?style=for-the-badge)]() +[![Github Workflow Status](https://img.shields.io/github/workflow/status/envygeeks/jekyll-docker/Push?style=for-the-badge)](https://github.com/envygeeks/jekyll-docker/actions) [![Donate](https://img.shields.io/badge/DONATE-MONEY-yellow.svg?style=for-the-badge)](https://envygeeks.io#donate) +[![Docker Stars](https://img.shields.io/docker/stars/jekyll/jekyll.svg?style=for-the-badge)]() +[![Docker Pulls](https://img.shields.io/docker/pulls/jekyll/jekyll.svg?style=for-the-badge)]() # Jekyll Docker -Jekyll Docker is a software image that has Jekyll and many of its dependencies ready to use for you in an encapsulated format. It includes a default set of gems, different image types with different extra packages, and wrappers to make Jekyll run more smoothly from start to finish for most Jekyll users. If you would like to know more about Docker you can visit https://docker.com, and if you would like to know more about Jekyll, you can visit https://github.com/jekyll/jekyll +Jekyll Docker is a software image that has Jekyll and many of its dependencies ready to use for you in an encapsulated format. It includes a default set of gems, different image types with different extra packages, and wrappers to make Jekyll run more smoothly from start to finish for most Jekyll users. If you would like to know more about Docker you can visit , and if you would like to know more about Jekyll, you can visit ## Image Types @@ -23,13 +25,18 @@ docker run --rm \ -it jekyll/jekyll:$JEKYLL_VERSION \ jekyll build ``` + #### Quick start under Windows (cmd) + ```cmd set site_name=my-blog docker run --rm --volume="%CD%:/srv/jekyll" -it jekyll/jekyll sh -c "chown -R jekyll /usr/gem/ && jekyll new %site_name%" && cd %site_name% ``` + #### Quick start under Linux / Git Bash + If you are under linux skip `export MSYS_NO_PATHCONV=1`. It is added for compatibility. You can check [here](https://github.com/docker-archive/toolbox/issues/673). + ```sh export site_name="my-blog" && export MSYS_NO_PATHCONV=1 docker run --rm \ @@ -38,6 +45,7 @@ docker run --rm \ sh -c "chown -R jekyll /usr/gem/ && jekyll new $site_name" \ && cd $site_name ``` + ### Builder The builder image comes with extra stuff that is not included in the standard image, like `lftp`, `openssh` and other extra packages meant to be used by people who are deploying their Jekyll builds to another server with a CI. @@ -78,7 +86,7 @@ podman run -ti --rm -v .:/srv/jekyll -e JEKYLL_ROOTLESS=1 docker.io/jekyll/jekyl ## Server -For local development, Jekyll can be run in server mode inside the container. It will watch for changes, rebuild the site, and provide access through its included web server. You can then check the results of changes by reloading http://localhost:4000/ in a browser. +For local development, Jekyll can be run in server mode inside the container. It will watch for changes, rebuild the site, and provide access through its included web server. You can then check the results of changes by reloading in a browser. #### Usage @@ -89,6 +97,7 @@ docker run --rm \ jekyll/jekyll \ jekyll serve ``` + ## Dependencies Jekyll Docker will attempt to install any dependencies that you list inside of your `Gemfile`, matching the versions you have in your `Gemfile.lock`, including Jekyll if you have a version that does not match the version of the image you are using (you should be doing `gem "jekyll", "~> 3.8"` so that minor versions are installed if you use say image tag "3.7.3"). @@ -123,6 +132,7 @@ docker run --rm \ -it jekyll/jekyll:$JEKYLL_VERSION \ jekyll build ``` + ***The root of the cache volume (in this case vendor) must also be excluded from the Jekyll build via the `_config.yml` exclude array setting.*** ## Configuration @@ -141,7 +151,7 @@ If you would like to know the CLI options for Jekyll, you can visit [Jekyll's He ## Packages -You can install system packages by providing a file named `.apk` with one package per line. If you need to find out what the package names are for a given command you wish to use you can visit https://pkgs.alpinelinux.org. ***We provide many dependencies for most Ruby stuff by default for `builder` and standard images. This includes `ruby-dev`, `xml`, `xslt`, `git` and other stuff that most Ruby packages might need.*** +You can install system packages by providing a file named `.apk` with one package per line. If you need to find out what the package names are for a given command you wish to use you can visit . ***We provide many dependencies for most Ruby stuff by default for `builder` and standard images. This includes `ruby-dev`, `xml`, `xslt`, `git` and other stuff that most Ruby packages might need.*** ## Building @@ -149,5 +159,4 @@ You can install system packages by providing a file named `.apk` with one packag script/build ``` -[1]: https://travis-ci.org/jekyll/docker [2]: http://jekyllrb.com/docs/configuration/#build-command-options From cc17b8bf6f13dd0bfb8eb5eb354b45f9c1150a6f Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Fri, 25 Aug 2023 16:43:21 +0200 Subject: [PATCH 03/29] DOCKER_USERNAME=jvconseil --- .github/workflows/deploy.yml | 6 +++--- .travis.yml | 20 ++++++++++---------- opts.yml | 10 +++++----- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1a26809..bb9831b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,19 +15,19 @@ jobs: matrix: env: - - - jekyll:4.2.2 + - jekyll:4.3.2 - jekyll:stable - jekyll:latest - jekyll:4.0 - jekyll:4 - - - builder:4.2.2 + - builder:4.3.2 - builder:stable - builder:latest - builder:4.0 - builder:4 - - - minimal:4.2.2 + - minimal:4.3.2 - minimal:stable - minimal:latest - minimal:4.0 diff --git a/.travis.yml b/.travis.yml index aa60836..a91aa90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,13 +13,13 @@ branches: - master env: global: - - DOCKER_EMAIL=jordon@envygeeks.io - - DOCKER_USERNAME=envygeeks - - secure: "\ - Vp8S6Pevc4pidnNM1NZx/1rCckOFc5C90a/0c6F/fIhGiOfl3o3yaUBKqbBLNTYxYCH8J0Hko\ - S/Y5Xs2K5XMlsnQXXxeBQntDVMS6XX5q7j65EcK+bRNUxOo2A51rw0jUmPDNa2i7g90sNExjW\ - XYh03nFe6cbXXHrLdrOt4+A4I= - " + - DOCKER_EMAIL=contact@jv-conseil.net + - DOCKER_USERNAME=jvconseil + # - secure: "\ + # Vp8S6Pevc4pidnNM1NZx/1rCckOFc5C90a/0c6F/fIhGiOfl3o3yaUBKqbBLNTYxYCH8J0Hko\ + # S/Y5Xs2K5XMlsnQXXxeBQntDVMS6XX5q7j65EcK+bRNUxOo2A51rw0jUmPDNa2i7g90sNExjW\ + # XYh03nFe6cbXXHrLdrOt4+A4I= + # " jobs: include: - script: true @@ -30,7 +30,7 @@ jobs: # -- env: "\ DOCKER_REPO='\ - jekyll:4.2.2 \ + jekyll:4.3.2 \ jekyll:stable \ jekyll:latest \ jekyll:pages \ @@ -43,7 +43,7 @@ jobs: # -- - env: "\ DOCKER_REPO='\ - builder:4.2.2 \ + builder:4.3.2 \ builder:stable \ builder:latest \ jekyll:builder \ @@ -57,7 +57,7 @@ jobs: # -- - env: "\ DOCKER_REPO='\ - minimal:4.2.2 \ + minimal:4.3.2 \ minimal:stable \ minimal:latest \ jekyll:minimal \ diff --git a/opts.yml b/opts.yml index c207869..8d595a4 100644 --- a/opts.yml +++ b/opts.yml @@ -1,12 +1,12 @@ base_image: ruby:3.1.4-alpine3.18 user: jekyll aliases: - latest: 4.2.2 - stable: 4.2.2 - 4.0: 4.2.2 - 4: 4.2.2 + latest: 4.3.2 + stable: 4.3.2 + 4.0: 4.3.2 + 4: 4.3.2 tags: - 4.2.2: stable + 4.3.2: stable pages: pages releases: tag: From 116ed4d6dbfcd70d7dd7ea1fe2acc0eddc665f4e Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Fri, 25 Aug 2023 16:46:53 +0200 Subject: [PATCH 04/29] Update codeowners --- .github/codeowners | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/codeowners b/.github/codeowners index 5a22f83..d0d6983 100644 --- a/.github/codeowners +++ b/.github/codeowners @@ -1 +1,2 @@ * @envygeeks +* @JV-conseil From 5d4c4e248f1b91d58e9d34d6e46544b49a6ecc95 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Fri, 25 Aug 2023 16:47:16 +0200 Subject: [PATCH 05/29] Update codeowners --- .github/codeowners | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/codeowners b/.github/codeowners index d0d6983..5a22f83 100644 --- a/.github/codeowners +++ b/.github/codeowners @@ -1,2 +1 @@ * @envygeeks -* @JV-conseil From 563b2b116bc474929c62fcf8fb649585efd16a16 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Fri, 25 Aug 2023 16:49:43 +0200 Subject: [PATCH 06/29] Update codeowners --- .github/codeowners | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/codeowners b/.github/codeowners index 5a22f83..d0d6983 100644 --- a/.github/codeowners +++ b/.github/codeowners @@ -1 +1,2 @@ * @envygeeks +* @JV-conseil From 46aba380efdd39b3d77e768c16dfccb18731b64f Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Fri, 25 Aug 2023 16:57:43 +0200 Subject: [PATCH 07/29] ruby/setup-ruby@v1 --- .github/workflows/build.yml | 5 +++-- .github/workflows/deploy.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a542af..1bdfe91 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,9 +15,10 @@ jobs: - jekyll:pages steps: - uses: actions/checkout@v3 - - uses: actions/setup-ruby@v1 + - uses: ruby/setup-ruby@v1 with: - ruby-version: '2.x' + ruby-version: ${{ matrix.ruby }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically - run: bundle install - run: | echo $'{\n "experimental": true\n}' | \ diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bb9831b..737a6cf 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -37,9 +37,10 @@ jobs: - jekyll:pages steps: - uses: actions/checkout@v3 - - uses: actions/setup-ruby@v1 + - uses: ruby/setup-ruby@v1 with: - ruby-version: '2.x' + ruby-version: ${{ matrix.ruby }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically - run: bundle install - run: | echo $'{\n "experimental": true\n}' | \ From 0a1ee496ae5b21a154e25d023fa500d7add53955 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Fri, 25 Aug 2023 17:06:59 +0200 Subject: [PATCH 08/29] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 95b00b5..7a3f37b 100644 --- a/README.md +++ b/README.md @@ -160,3 +160,4 @@ script/build ``` [2]: http://jekyllrb.com/docs/configuration/#build-command-options + From 48780a64e60acf320d44cde07e6719706b5db7f7 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Fri, 25 Aug 2023 17:08:46 +0200 Subject: [PATCH 09/29] Update deploy.yml --- .github/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 737a6cf..39fa323 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,8 @@ name: 'Push' on: push: branches: - - $default-branch + # - $default-branch + - main schedule: - cron: 2 4 10 * * jobs: From e9edc334c0cb367b5a76c79c26e6dc16b8653956 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Fri, 25 Aug 2023 17:13:23 +0200 Subject: [PATCH 10/29] Update deploy.yml --- .github/workflows/deploy.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 39fa323..47f5057 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -48,11 +48,16 @@ jobs: sudo tee /etc/docker/daemon.json sudo systemctl restart docker name: 'docker experimental' - - name: 'docker login' - run: | - echo "${{secrets.DOCKER_PASSWORD}}" | docker login \ - --username ${{secrets.DOCKER_USERNAME}} \ - --password-stdin + # - name: 'docker login' + # run: | + # echo "${{secrets.DOCKER_PASSWORD}}" | docker login \ + # --username ${{secrets.DOCKER_USERNAME}} \ + # --password-stdin + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - run: | docker-template build $DOCKER_REPO --no-push --force --squash docker-template push $DOCKER_REPO From 6939bc92b5686c87df6bc0e060b286cab66f01d1 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Fri, 25 Aug 2023 17:21:24 +0200 Subject: [PATCH 11/29] Update deploy.yml --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 47f5057..099237a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -56,8 +56,8 @@ jobs: - name: Login to Docker Hub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{secrets.DOCKER_USERNAME}} + password: ${{secrets.DOCKER_PASSWORD}} - run: | docker-template build $DOCKER_REPO --no-push --force --squash docker-template push $DOCKER_REPO From d671b2d459432e8c235a216486c4de73a92e0d53 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Fri, 25 Aug 2023 17:30:09 +0200 Subject: [PATCH 12/29] Update deploy.yml --- .github/workflows/deploy.yml | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 099237a..5f0c38b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,4 +1,4 @@ -name: 'Push' +name: "Push" on: push: branches: @@ -10,25 +10,22 @@ jobs: build: runs-on: ubuntu-latest timeout-minutes: 360 - name: 'Build' + name: "Build" strategy: fail-fast: false matrix: env: - - - - jekyll:4.3.2 + - - jekyll:4.3.2 - jekyll:stable - jekyll:latest - jekyll:4.0 - jekyll:4 - - - - builder:4.3.2 + - - builder:4.3.2 - builder:stable - builder:latest - builder:4.0 - builder:4 - - - - minimal:4.3.2 + - - minimal:4.3.2 - minimal:stable - minimal:latest - minimal:4.0 @@ -47,17 +44,17 @@ jobs: echo $'{\n "experimental": true\n}' | \ sudo tee /etc/docker/daemon.json sudo systemctl restart docker - name: 'docker experimental' - # - name: 'docker login' - # run: | - # echo "${{secrets.DOCKER_PASSWORD}}" | docker login \ - # --username ${{secrets.DOCKER_USERNAME}} \ - # --password-stdin - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{secrets.DOCKER_USERNAME}} - password: ${{secrets.DOCKER_PASSWORD}} + name: "docker experimental" + - name: 'docker login' + run: | + echo "${{ secrets.DOCKER_PASSWORD }}" | docker login \ + --username ${{ secrets.DOCKER_USERNAME }} \ + --password-stdin + # - name: Login to Docker Hub + # uses: docker/login-action@v2 + # with: + # username: ${{secrets.DOCKER_USERNAME}} + # password: ${{secrets.DOCKER_PASSWORD}} - run: | docker-template build $DOCKER_REPO --no-push --force --squash docker-template push $DOCKER_REPO From 1fe1c5ea5f2bbc011e6105a81563dc276fbd5a1e Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Sat, 26 Aug 2023 13:41:03 +0200 Subject: [PATCH 13/29] jekyll:4.2.2 --- .github/codeowners | 1 - .github/workflows/build.yml | 5 ++--- .github/workflows/deploy.yml | 32 ++++++++++++++------------------ .travis.yml | 20 ++++++++++---------- README.md | 20 +++++--------------- opts.yml | 12 ++++++------ 6 files changed, 37 insertions(+), 53 deletions(-) diff --git a/.github/codeowners b/.github/codeowners index d0d6983..5a22f83 100644 --- a/.github/codeowners +++ b/.github/codeowners @@ -1,2 +1 @@ * @envygeeks -* @JV-conseil diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1bdfe91..0a542af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,10 +15,9 @@ jobs: - jekyll:pages steps: - uses: actions/checkout@v3 - - uses: ruby/setup-ruby@v1 + - uses: actions/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true # runs 'bundle install' and caches installed gems automatically + ruby-version: '2.x' - run: bundle install - run: | echo $'{\n "experimental": true\n}' | \ diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5f0c38b..1a26809 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,31 +1,33 @@ -name: "Push" +name: 'Push' on: push: branches: - # - $default-branch - - main + - $default-branch schedule: - cron: 2 4 10 * * jobs: build: runs-on: ubuntu-latest timeout-minutes: 360 - name: "Build" + name: 'Build' strategy: fail-fast: false matrix: env: - - - jekyll:4.3.2 + - + - jekyll:4.2.2 - jekyll:stable - jekyll:latest - jekyll:4.0 - jekyll:4 - - - builder:4.3.2 + - + - builder:4.2.2 - builder:stable - builder:latest - builder:4.0 - builder:4 - - - minimal:4.3.2 + - + - minimal:4.2.2 - minimal:stable - minimal:latest - minimal:4.0 @@ -35,26 +37,20 @@ jobs: - jekyll:pages steps: - uses: actions/checkout@v3 - - uses: ruby/setup-ruby@v1 + - uses: actions/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true # runs 'bundle install' and caches installed gems automatically + ruby-version: '2.x' - run: bundle install - run: | echo $'{\n "experimental": true\n}' | \ sudo tee /etc/docker/daemon.json sudo systemctl restart docker - name: "docker experimental" + name: 'docker experimental' - name: 'docker login' run: | - echo "${{ secrets.DOCKER_PASSWORD }}" | docker login \ - --username ${{ secrets.DOCKER_USERNAME }} \ + echo "${{secrets.DOCKER_PASSWORD}}" | docker login \ + --username ${{secrets.DOCKER_USERNAME}} \ --password-stdin - # - name: Login to Docker Hub - # uses: docker/login-action@v2 - # with: - # username: ${{secrets.DOCKER_USERNAME}} - # password: ${{secrets.DOCKER_PASSWORD}} - run: | docker-template build $DOCKER_REPO --no-push --force --squash docker-template push $DOCKER_REPO diff --git a/.travis.yml b/.travis.yml index a91aa90..aa60836 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,13 +13,13 @@ branches: - master env: global: - - DOCKER_EMAIL=contact@jv-conseil.net - - DOCKER_USERNAME=jvconseil - # - secure: "\ - # Vp8S6Pevc4pidnNM1NZx/1rCckOFc5C90a/0c6F/fIhGiOfl3o3yaUBKqbBLNTYxYCH8J0Hko\ - # S/Y5Xs2K5XMlsnQXXxeBQntDVMS6XX5q7j65EcK+bRNUxOo2A51rw0jUmPDNa2i7g90sNExjW\ - # XYh03nFe6cbXXHrLdrOt4+A4I= - # " + - DOCKER_EMAIL=jordon@envygeeks.io + - DOCKER_USERNAME=envygeeks + - secure: "\ + Vp8S6Pevc4pidnNM1NZx/1rCckOFc5C90a/0c6F/fIhGiOfl3o3yaUBKqbBLNTYxYCH8J0Hko\ + S/Y5Xs2K5XMlsnQXXxeBQntDVMS6XX5q7j65EcK+bRNUxOo2A51rw0jUmPDNa2i7g90sNExjW\ + XYh03nFe6cbXXHrLdrOt4+A4I= + " jobs: include: - script: true @@ -30,7 +30,7 @@ jobs: # -- env: "\ DOCKER_REPO='\ - jekyll:4.3.2 \ + jekyll:4.2.2 \ jekyll:stable \ jekyll:latest \ jekyll:pages \ @@ -43,7 +43,7 @@ jobs: # -- - env: "\ DOCKER_REPO='\ - builder:4.3.2 \ + builder:4.2.2 \ builder:stable \ builder:latest \ jekyll:builder \ @@ -57,7 +57,7 @@ jobs: # -- - env: "\ DOCKER_REPO='\ - minimal:4.3.2 \ + minimal:4.2.2 \ minimal:stable \ minimal:latest \ jekyll:minimal \ diff --git a/README.md b/README.md index 7a3f37b..e9f1e22 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ -[![Github Workflow Status](https://img.shields.io/github/workflow/status/envygeeks/jekyll-docker/Push?style=for-the-badge)](https://github.com/envygeeks/jekyll-docker/actions) [![Donate](https://img.shields.io/badge/DONATE-MONEY-yellow.svg?style=for-the-badge)](https://envygeeks.io#donate) -[![Docker Stars](https://img.shields.io/docker/stars/jekyll/jekyll.svg?style=for-the-badge)]() -[![Docker Pulls](https://img.shields.io/docker/pulls/jekyll/jekyll.svg?style=for-the-badge)]() +[![Github Workflow Status](https://img.shields.io/github/workflow/status/envygeeks/jekyll-docker/Push?style=for-the-badge)](https://github.com/envygeeks/jekyll-docker/actions) [![Donate](https://img.shields.io/badge/DONATE-MONEY-yellow.svg?style=for-the-badge)](https://envygeeks.io#donate) [![Docker Stars](https://img.shields.io/docker/stars/jekyll/jekyll.svg?style=for-the-badge)]() [![Docker Pulls](https://img.shields.io/docker/pulls/jekyll/jekyll.svg?style=for-the-badge)]() # Jekyll Docker -Jekyll Docker is a software image that has Jekyll and many of its dependencies ready to use for you in an encapsulated format. It includes a default set of gems, different image types with different extra packages, and wrappers to make Jekyll run more smoothly from start to finish for most Jekyll users. If you would like to know more about Docker you can visit , and if you would like to know more about Jekyll, you can visit +Jekyll Docker is a software image that has Jekyll and many of its dependencies ready to use for you in an encapsulated format. It includes a default set of gems, different image types with different extra packages, and wrappers to make Jekyll run more smoothly from start to finish for most Jekyll users. If you would like to know more about Docker you can visit https://docker.com, and if you would like to know more about Jekyll, you can visit https://github.com/jekyll/jekyll ## Image Types @@ -25,18 +23,13 @@ docker run --rm \ -it jekyll/jekyll:$JEKYLL_VERSION \ jekyll build ``` - #### Quick start under Windows (cmd) - ```cmd set site_name=my-blog docker run --rm --volume="%CD%:/srv/jekyll" -it jekyll/jekyll sh -c "chown -R jekyll /usr/gem/ && jekyll new %site_name%" && cd %site_name% ``` - #### Quick start under Linux / Git Bash - If you are under linux skip `export MSYS_NO_PATHCONV=1`. It is added for compatibility. You can check [here](https://github.com/docker-archive/toolbox/issues/673). - ```sh export site_name="my-blog" && export MSYS_NO_PATHCONV=1 docker run --rm \ @@ -45,7 +38,6 @@ docker run --rm \ sh -c "chown -R jekyll /usr/gem/ && jekyll new $site_name" \ && cd $site_name ``` - ### Builder The builder image comes with extra stuff that is not included in the standard image, like `lftp`, `openssh` and other extra packages meant to be used by people who are deploying their Jekyll builds to another server with a CI. @@ -86,7 +78,7 @@ podman run -ti --rm -v .:/srv/jekyll -e JEKYLL_ROOTLESS=1 docker.io/jekyll/jekyl ## Server -For local development, Jekyll can be run in server mode inside the container. It will watch for changes, rebuild the site, and provide access through its included web server. You can then check the results of changes by reloading in a browser. +For local development, Jekyll can be run in server mode inside the container. It will watch for changes, rebuild the site, and provide access through its included web server. You can then check the results of changes by reloading http://localhost:4000/ in a browser. #### Usage @@ -97,7 +89,6 @@ docker run --rm \ jekyll/jekyll \ jekyll serve ``` - ## Dependencies Jekyll Docker will attempt to install any dependencies that you list inside of your `Gemfile`, matching the versions you have in your `Gemfile.lock`, including Jekyll if you have a version that does not match the version of the image you are using (you should be doing `gem "jekyll", "~> 3.8"` so that minor versions are installed if you use say image tag "3.7.3"). @@ -132,7 +123,6 @@ docker run --rm \ -it jekyll/jekyll:$JEKYLL_VERSION \ jekyll build ``` - ***The root of the cache volume (in this case vendor) must also be excluded from the Jekyll build via the `_config.yml` exclude array setting.*** ## Configuration @@ -151,7 +141,7 @@ If you would like to know the CLI options for Jekyll, you can visit [Jekyll's He ## Packages -You can install system packages by providing a file named `.apk` with one package per line. If you need to find out what the package names are for a given command you wish to use you can visit . ***We provide many dependencies for most Ruby stuff by default for `builder` and standard images. This includes `ruby-dev`, `xml`, `xslt`, `git` and other stuff that most Ruby packages might need.*** +You can install system packages by providing a file named `.apk` with one package per line. If you need to find out what the package names are for a given command you wish to use you can visit https://pkgs.alpinelinux.org. ***We provide many dependencies for most Ruby stuff by default for `builder` and standard images. This includes `ruby-dev`, `xml`, `xslt`, `git` and other stuff that most Ruby packages might need.*** ## Building @@ -159,5 +149,5 @@ You can install system packages by providing a file named `.apk` with one packag script/build ``` +[1]: https://travis-ci.org/jekyll/docker [2]: http://jekyllrb.com/docs/configuration/#build-command-options - diff --git a/opts.yml b/opts.yml index 8d595a4..465b630 100644 --- a/opts.yml +++ b/opts.yml @@ -1,12 +1,12 @@ -base_image: ruby:3.1.4-alpine3.18 +base_image: ruby:3.1.1-alpine3.15 user: jekyll aliases: - latest: 4.3.2 - stable: 4.3.2 - 4.0: 4.3.2 - 4: 4.3.2 + latest: 4.2.2 + stable: 4.2.2 + 4.0: 4.2.2 + 4: 4.2.2 tags: - 4.3.2: stable + 4.2.2: stable pages: pages releases: tag: From aff6cac7f0d6972808ddd69c36059962ae5bf3a0 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Sat, 26 Aug 2023 17:10:01 +0200 Subject: [PATCH 14/29] base_image: ruby:3.2.2-alpine3.18 --- .github/FUNDING.yml | 4 +- .github/codeowners | 2 +- .github/security | 1 - .../build.yml | 6 +- .github/workflows/deploy.yml | 89 +++--- .travis.yml | 74 ++--- .vscode/extensions.json | 13 + .vscode/settings.json | 45 +++ .vscode/shellscript.code-snippets | 120 ++++++++ .vscode/tasks.json | 37 +++ COPYING | 13 - LICENSE | 287 ++++++++++++++++++ README.md | 59 +++- opts.yml | 14 +- repos/builder/Dockerfile | 1 - repos/builder/copy | 1 - repos/jekyll-docker/Dockerfile | 196 ++++++++++++ .../copy/all/usr/jekyll/bin/bundle | 7 +- .../copy/all/usr/jekyll/bin/connected | 6 +- .../copy/all/usr/jekyll/bin/default-args | 0 .../usr/jekyll/bin/default-gem-permissions | 0 .../copy/all/usr/jekyll/bin/entrypoint | 10 +- .../copy/all/usr/jekyll/bin/gem | 0 .../copy/all/usr/jekyll/bin/jekyll | 5 +- repos/{builder => jekyll-docker}/opts.yml | 0 repos/{minimal => jekyll-minimal}/opts.yml | 0 repos/jekyll/Dockerfile | Bin 3219 -> 1024 bytes repos/jekyll/copy | Bin 0 -> 1016 bytes repos/jekyll/opts.yml | 4 +- repos/minimal/Dockerfile | 1 - repos/minimal/copy | 1 - 31 files changed, 865 insertions(+), 131 deletions(-) delete mode 100644 .github/security rename .github/{workflows => workflows-disabled}/build.yml (78%) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/shellscript.code-snippets create mode 100644 .vscode/tasks.json delete mode 100644 COPYING create mode 100644 LICENSE delete mode 120000 repos/builder/Dockerfile delete mode 120000 repos/builder/copy create mode 100644 repos/jekyll-docker/Dockerfile rename repos/{jekyll => jekyll-docker}/copy/all/usr/jekyll/bin/bundle (91%) rename repos/{jekyll => jekyll-docker}/copy/all/usr/jekyll/bin/connected (73%) rename repos/{jekyll => jekyll-docker}/copy/all/usr/jekyll/bin/default-args (100%) rename repos/{jekyll => jekyll-docker}/copy/all/usr/jekyll/bin/default-gem-permissions (100%) rename repos/{jekyll => jekyll-docker}/copy/all/usr/jekyll/bin/entrypoint (83%) rename repos/{jekyll => jekyll-docker}/copy/all/usr/jekyll/bin/gem (100%) rename repos/{jekyll => jekyll-docker}/copy/all/usr/jekyll/bin/jekyll (85%) rename repos/{builder => jekyll-docker}/opts.yml (100%) rename repos/{minimal => jekyll-minimal}/opts.yml (100%) create mode 100644 repos/jekyll/copy delete mode 120000 repos/minimal/Dockerfile delete mode 120000 repos/minimal/copy diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 1c60d67..8ecdadc 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,3 @@ -github: envygeeks +github: JV-conseil +# ko_fi: jvconseil +# custom: ["https://www.paypal.com/donate/?hosted_button_id=P3DGL6EANDY96", "https://paypal.me/jvconseil"] diff --git a/.github/codeowners b/.github/codeowners index 5a22f83..c0dc46f 100644 --- a/.github/codeowners +++ b/.github/codeowners @@ -1 +1 @@ -* @envygeeks +* @JV-conseil diff --git a/.github/security b/.github/security deleted file mode 100644 index 5a22f83..0000000 --- a/.github/security +++ /dev/null @@ -1 +0,0 @@ -* @envygeeks diff --git a/.github/workflows/build.yml b/.github/workflows-disabled/build.yml similarity index 78% rename from .github/workflows/build.yml rename to .github/workflows-disabled/build.yml index 0a542af..aa52586 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows-disabled/build.yml @@ -15,9 +15,11 @@ jobs: - jekyll:pages steps: - uses: actions/checkout@v3 - - uses: actions/setup-ruby@v1 + - name: 'Setup Ruby' + uses: ruby/setup-ruby@v1 with: - ruby-version: '2.x' + ruby-version: ${{ matrix.ruby }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically - run: bundle install - run: | echo $'{\n "experimental": true\n}' | \ diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1a26809..5708ea6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,59 +1,76 @@ -name: 'Push' +# Deploy to Docker Hub +# See +# Copyright (c) 2019-2023 JV-conseil, All rights reserved +name: "Deploy" + on: push: branches: - - $default-branch - schedule: - - cron: 2 4 10 * * + - main + jobs: build: runs-on: ubuntu-latest timeout-minutes: 360 - name: 'Build' + + name: "Deploy" + strategy: fail-fast: false matrix: env: - - - - jekyll:4.2.2 - - jekyll:stable - - jekyll:latest - - jekyll:4.0 - - jekyll:4 - - - - builder:4.2.2 - - builder:stable - - builder:latest - - builder:4.0 - - builder:4 - - - - minimal:4.2.2 - - minimal:stable - - minimal:latest - - minimal:4.0 - - minimal:4 - - builder:pages - - minimal:pages - - jekyll:pages + # - + # - jekyll:4.3.2 + # - jekyll:stable + # - jekyll:latest + # - jekyll:4.0 + # - jekyll:4 + - - jekyll-docker:4.3.2 + - jekyll-docker:stable + - jekyll-docker:latest + - jekyll-docker:4.0 + - jekyll-docker:4 + # - + # - minimal:4.3.2 + # - minimal:stable + # - minimal:latest + # - minimal:4.0 + # - minimal:4 + # - jekyll-docker:pages + # - minimal:pages + # - jekyll:pages + steps: - uses: actions/checkout@v3 - - uses: actions/setup-ruby@v1 + + - name: "Setup Ruby" + uses: ruby/setup-ruby@v1 with: - ruby-version: '2.x' + ruby-version: 2.7.0 + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - run: bundle install - run: | echo $'{\n "experimental": true\n}' | \ sudo tee /etc/docker/daemon.json sudo systemctl restart docker - name: 'docker experimental' - - name: 'docker login' - run: | - echo "${{secrets.DOCKER_PASSWORD}}" | docker login \ - --username ${{secrets.DOCKER_USERNAME}} \ - --password-stdin + name: "Docker Experimental" + + # - name: 'docker login' + # run: | + # echo "${{ secrets.DOCKER_PASSWORD }}" | docker login \ + # --username ${{ secrets.DOCKER_USERNAME }} \ + # --password-stdin + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - run: | - docker-template build $DOCKER_REPO --no-push --force --squash - docker-template push $DOCKER_REPO + bundle exec docker-template build $DOCKER_REPO --no-push --force --squash + bundle exec docker-template push $DOCKER_REPO env: RUBYOPT: "-W0" DOCKER_REPO: "${{join(matrix.env, ' ')}}" diff --git a/.travis.yml b/.travis.yml index aa60836..ffd0c16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,16 +10,16 @@ cache: - vendor/bundle branches: only: - - master + - main env: global: - - DOCKER_EMAIL=jordon@envygeeks.io - - DOCKER_USERNAME=envygeeks - - secure: "\ - Vp8S6Pevc4pidnNM1NZx/1rCckOFc5C90a/0c6F/fIhGiOfl3o3yaUBKqbBLNTYxYCH8J0Hko\ - S/Y5Xs2K5XMlsnQXXxeBQntDVMS6XX5q7j65EcK+bRNUxOo2A51rw0jUmPDNa2i7g90sNExjW\ - XYh03nFe6cbXXHrLdrOt4+A4I= - " + - DOCKER_EMAIL=contact@jv-conseil.net + - DOCKER_USERNAME=jvconseil + # - secure: "\ + # Vp8S6Pevc4pidnNM1NZx/1rCckOFc5C90a/0c6F/fIhGiOfl3o3yaUBKqbBLNTYxYCH8J0Hko\ + # S/Y5Xs2K5XMlsnQXXxeBQntDVMS6XX5q7j65EcK+bRNUxOo2A51rw0jUmPDNa2i7g90sNExjW\ + # XYh03nFe6cbXXHrLdrOt4+A4I= + # " jobs: include: - script: true @@ -28,41 +28,41 @@ jobs: # -- # jekyll/jekyll # -- - env: "\ - DOCKER_REPO='\ - jekyll:4.2.2 \ - jekyll:stable \ - jekyll:latest \ - jekyll:pages \ - jekyll:4.0 \ - jekyll:4 \ - '\ - " + # env: "\ + # DOCKER_REPO='\ + # jekyll:4.3.2 \ + # jekyll:stable \ + # jekyll:latest \ + # jekyll:pages \ + # jekyll:4.0 \ + # jekyll:4 \ + # '\ + # " # -- - # jekyll/builder + # jvconseil/jekyll-docker # -- - env: "\ DOCKER_REPO='\ - builder:4.2.2 \ - builder:stable \ - builder:latest \ - jekyll:builder \ - builder:pages \ - builder:4.0 \ - builder:4 \ + jekyll-docker:4.3.2 \ + jekyll-docker:stable \ + jekyll-docker:latest \ + jvconseil:jekyll-docker \ + jekyll-docker:pages \ + jekyll-docker:4.0 \ + jekyll-docker:4 \ '\ " # -- # jekyll/minimal # -- - - env: "\ - DOCKER_REPO='\ - minimal:4.2.2 \ - minimal:stable \ - minimal:latest \ - jekyll:minimal \ - minimal:pages \ - minimal:4.0 \ - minimal:4 \ - '\ - " + # - env: "\ + # DOCKER_REPO='\ + # minimal:4.3.2 \ + # minimal:stable \ + # minimal:latest \ + # jekyll:minimal \ + # minimal:pages \ + # minimal:4.0 \ + # minimal:4 \ + # '\ + # " diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..4d2b71c --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,13 @@ +{ + "recommendations": [ + "dbaeumer.vscode-eslint", + "editorconfig.editorconfig", + "timonwong.shellcheck", + "yzhang.markdown-all-in-one", + "davidanson.vscode-markdownlint", + "foxundermoon.shell-format", + "bierner.markdown-emoji", + "esbenp.prettier-vscode", + "dotjoshjohnson.xml" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6cd46c5 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,45 @@ +{ + "[css][scss][less]": { + "editor.defaultFormatter": "vscode.css-language-features" + }, + "[html]": { + "editor.defaultFormatter": "vscode.html-language-features" + }, + "[javascript]": { + "editor.defaultFormatter": "vscode.typescript-language-features" + }, + "[jsonc]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + "[markdown]": { + "editor.defaultFormatter": "yzhang.markdown-all-in-one" + }, + "editor.bracketPairColorization.enabled": false, + "editor.formatOnSave": true, + "editor.matchBrackets": "always", + "editor.wordWrap": "on", + "files.eol": "\n", + "html.format.indentHandlebars": true, + "html.format.indentInnerHtml": true, + "html.format.templating": true, + "scss.format.braceStyle": "collapse", + "scss.format.enable": false, + "shellformat.effectLanguages": [ + "shellscript", + "dockerfile", + "dotenv", + "hosts", + "jvmoptions", + "ignore", + "gitignore", + "properties", + "spring-boot-properties", + "azcli", + "bats" + ], + "shellformat.useEditorConfig": true, + "task.allowAutomaticTasks": "on", + "terminal.integrated.defaultProfile.linux": "bash", + "terminal.integrated.defaultProfile.osx": "bash", + "terminal.integrated.defaultProfile.windows": "bash" +} \ No newline at end of file diff --git a/.vscode/shellscript.code-snippets b/.vscode/shellscript.code-snippets new file mode 100644 index 0000000..a8607df --- /dev/null +++ b/.vscode/shellscript.code-snippets @@ -0,0 +1,120 @@ +{ + // Place your snippets for shellscript here. Each snippet is defined under a snippet name and has a prefix, body and + // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the + // same ids are connected. + // Example: + // "Print to console": { + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + "bash": { + "prefix": [ + // "bash", + // "#!", + "shebang" + ], + "body": [ + "#!/usr/bin/env bash", + "# -*- coding: UTF-8 -*-", + "#", + "# author : JV-conseil", + "# credits : JV-conseil", + "# copyright : Copyright (c) 2019-2023 JV-conseil", + "# All rights reserved", + "#====================================================", + "", + ], + "description": "Shebang Bash executor" + }, + "function": { + "prefix": [ + "_jvcl_::", + "function" + ], + "body": [ + "_jvcl_::${1:generic_function}() {", + "\tlocal _arg=\"\\${1:-\"something\"}\"", + "\tif cmd; then", + "\t\t_arg=\"something else\"", + "\t\ttrue", + "\telse", + "\t\tfalse", + "\tfi", + "}", + ], + "description": [ + "This defines a generic function _jvcl_::generic_function() {}.\n", + "The reserved word function is optional.\n", + "If the function reserved word is supplied, the parentheses are optional.\n", + "1. Recommended way:\n", + "name() {}\n", + "2. C-like-way:\nfunction name [()] {}" + ] + }, + "array_loop": { + "prefix": [ + "for_array", + ], + "body": [ + "for _item in \"${MY_ARRAY[@]}\"; do", + "\techo \"${_item}\"", + "done", + ], + "description": [ + "Loop through an array", + ] + }, + "cat": { + "prefix": [ + "cat", + ], + "body": [ + "cat < + +Jekyll + + + # Jekyll Docker -Jekyll Docker is a software image that has Jekyll and many of its dependencies ready to use for you in an encapsulated format. It includes a default set of gems, different image types with different extra packages, and wrappers to make Jekyll run more smoothly from start to finish for most Jekyll users. If you would like to know more about Docker you can visit https://docker.com, and if you would like to know more about Jekyll, you can visit https://github.com/jekyll/jekyll +![Docker Pulls](https://img.shields.io/docker/pulls/jvconseil/jekyll-docker?logo=docker) +![Docker Stars](https://img.shields.io/docker/stars/jvconseil/jekyll-docker?logo=docker&color=orange) +[![Deploy](https://github.com/JV-conseil/jekyll-docker/actions/workflows/deploy.yml/badge.svg)](https://github.com/JV-conseil/jekyll-docker/actions/workflows/deploy.yml) +![visitors](https://visitor-badge.laobi.icu/badge?page_id=JV-conseil.jekyll-docker) +[![License EUPL 1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](LICENSE) +[![Become a sponsor to JV-conseil](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/JV-conseil "Become a sponsor to JV-conseil") +[![Follow JV conseil on StackOverflow](https://img.shields.io/stackexchange/stackoverflow/r/2477854)](https://stackoverflow.com/users/2477854/jv-conseil "Follow JV conseil on StackOverflow") +[![Follow JVconseil on Twitter](https://img.shields.io/twitter/follow/JVconseil.svg?style=social&logo=twitter)](https://twitter.com/JVconseil "Follow JVconseil on Twitter") +[![Follow JVconseil on Mastodon](https://img.shields.io/mastodon/follow/110950122046692405)](https://mastodon.social/@JVconseil "Follow JVconseil@mastodon.social on Mastodon") +[![Follow JV conseil on GitHub](https://img.shields.io/github/followers/JV-conseil?label=JV-conseil&style=social)](https://github.com/JV-conseil "Follow JV-conseil on GitHub") + +Jekyll Docker is a software image that has Jekyll and many of its dependencies ready to use for you in an encapsulated format. It includes a default set of gems, different image types with different extra packages, and wrappers to make Jekyll run more smoothly from start to finish for most Jekyll users. If you would like to know more about Docker you can visit , and if you would like to know more about Jekyll, you can visit ## Image Types * `jekyll/jekyll`: Default image. * `jekyll/minimal`: Very minimal image. -* `jekyll/builder`: Includes tools. +* `jvconseil/jekyll-docker`: Includes tools. ### Standard @@ -23,13 +39,18 @@ docker run --rm \ -it jekyll/jekyll:$JEKYLL_VERSION \ jekyll build ``` + #### Quick start under Windows (cmd) + ```cmd set site_name=my-blog docker run --rm --volume="%CD%:/srv/jekyll" -it jekyll/jekyll sh -c "chown -R jekyll /usr/gem/ && jekyll new %site_name%" && cd %site_name% ``` + #### Quick start under Linux / Git Bash + If you are under linux skip `export MSYS_NO_PATHCONV=1`. It is added for compatibility. You can check [here](https://github.com/docker-archive/toolbox/issues/673). + ```sh export site_name="my-blog" && export MSYS_NO_PATHCONV=1 docker run --rm \ @@ -38,6 +59,7 @@ docker run --rm \ sh -c "chown -R jekyll /usr/gem/ && jekyll new $site_name" \ && cd $site_name ``` + ### Builder The builder image comes with extra stuff that is not included in the standard image, like `lftp`, `openssh` and other extra packages meant to be used by people who are deploying their Jekyll builds to another server with a CI. @@ -48,7 +70,7 @@ The builder image comes with extra stuff that is not included in the standard im export JEKYLL_VERSION=3.8 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ - -it jekyll/builder:$JEKYLL_VERSION \ + -it jvconseil/jekyll-docker:$JEKYLL_VERSION \ jekyll build ``` @@ -78,7 +100,7 @@ podman run -ti --rm -v .:/srv/jekyll -e JEKYLL_ROOTLESS=1 docker.io/jekyll/jekyl ## Server -For local development, Jekyll can be run in server mode inside the container. It will watch for changes, rebuild the site, and provide access through its included web server. You can then check the results of changes by reloading http://localhost:4000/ in a browser. +For local development, Jekyll can be run in server mode inside the container. It will watch for changes, rebuild the site, and provide access through its included web server. You can then check the results of changes by reloading in a browser. #### Usage @@ -89,6 +111,7 @@ docker run --rm \ jekyll/jekyll \ jekyll serve ``` + ## Dependencies Jekyll Docker will attempt to install any dependencies that you list inside of your `Gemfile`, matching the versions you have in your `Gemfile.lock`, including Jekyll if you have a version that does not match the version of the image you are using (you should be doing `gem "jekyll", "~> 3.8"` so that minor versions are installed if you use say image tag "3.7.3"). @@ -123,25 +146,26 @@ docker run --rm \ -it jekyll/jekyll:$JEKYLL_VERSION \ jekyll build ``` + ***The root of the cache volume (in this case vendor) must also be excluded from the Jekyll build via the `_config.yml` exclude array setting.*** ## Configuration You can configure some pieces of Jekyll using environment variables, what you cannot with environment variables you can configure using the Jekyll CLI. Even with a wrapper, we pass all arguments onto Jekyll when we finally call it. -| ENV Var | Default | -|---|---| -| `JEKYLL_UID` | `1000` | -| `JEKYLL_GID` | `1000` | -| `JEKYLL_DEBUG`, | `""` | -| `VERBOSE` | `""` | -| `FORCE_POLLING` | `""` | +| ENV Var | Default | +| --------------- | ------- | +| `JEKYLL_UID` | `1000` | +| `JEKYLL_GID` | `1000` | +| `JEKYLL_DEBUG`, | `""` | +| `VERBOSE` | `""` | +| `FORCE_POLLING` | `""` | If you would like to know the CLI options for Jekyll, you can visit [Jekyll's Help Site][2] ## Packages -You can install system packages by providing a file named `.apk` with one package per line. If you need to find out what the package names are for a given command you wish to use you can visit https://pkgs.alpinelinux.org. ***We provide many dependencies for most Ruby stuff by default for `builder` and standard images. This includes `ruby-dev`, `xml`, `xslt`, `git` and other stuff that most Ruby packages might need.*** +You can install system packages by providing a file named `.apk` with one package per line. If you need to find out what the package names are for a given command you wish to use you can visit . ***We provide many dependencies for most Ruby stuff by default for `builder` and standard images. This includes `ruby-dev`, `xml`, `xslt`, `git` and other stuff that most Ruby packages might need.*** ## Building @@ -149,5 +173,12 @@ You can install system packages by providing a file named `.apk` with one packag script/build ``` -[1]: https://travis-ci.org/jekyll/docker +## Sponsorship + +If this project helps you, you can offer me a cup of coffee ☕️ :-) + +[![Become a sponsor to JV-conseil](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/JV-conseil) + + + [2]: http://jekyllrb.com/docs/configuration/#build-command-options diff --git a/opts.yml b/opts.yml index 465b630..86885ea 100644 --- a/opts.yml +++ b/opts.yml @@ -1,12 +1,12 @@ -base_image: ruby:3.1.1-alpine3.15 -user: jekyll +base_image: ruby:3.2.2-alpine3.18 +user: jvconseil aliases: - latest: 4.2.2 - stable: 4.2.2 - 4.0: 4.2.2 - 4: 4.2.2 + latest: 4.3.2 + stable: 4.3.2 + 4.0: 4.3.2 + 4: 4.3.2 tags: - 4.2.2: stable + 4.3.2: stable pages: pages releases: tag: diff --git a/repos/builder/Dockerfile b/repos/builder/Dockerfile deleted file mode 120000 index 0f40514..0000000 --- a/repos/builder/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -../jekyll/Dockerfile \ No newline at end of file diff --git a/repos/builder/copy b/repos/builder/copy deleted file mode 120000 index f9b3c8f..0000000 --- a/repos/builder/copy +++ /dev/null @@ -1 +0,0 @@ -../jekyll/copy \ No newline at end of file diff --git a/repos/jekyll-docker/Dockerfile b/repos/jekyll-docker/Dockerfile new file mode 100644 index 0000000..dc4afab --- /dev/null +++ b/repos/jekyll-docker/Dockerfile @@ -0,0 +1,196 @@ +FROM <%= @meta.base_image %> +LABEL maintainer "Jordon Bedwell " +COPY copy / + +# +# EnvVars +# Ruby +# + +ENV BUNDLE_HOME=/usr/local/bundle +ENV BUNDLE_APP_CONFIG=/usr/local/bundle +ENV BUNDLE_DISABLE_PLATFORM_WARNINGS=true +ENV BUNDLE_BIN=/usr/local/bundle/bin +ENV GEM_BIN=/usr/gem/bin +ENV GEM_HOME=/usr/gem +ENV RUBYOPT=-W0 + +# +# EnvVars +# Image +# + +ENV JEKYLL_VAR_DIR=/var/jekyll +ENV JEKYLL_DOCKER_TAG=<%= @meta.tag %> +ENV JEKYLL_VERSION=<%= @meta.release?? @meta.release : @meta.tag %> +ENV JEKYLL_DOCKER_COMMIT=<%= `git rev-parse --verify HEAD`.strip %> +ENV JEKYLL_DOCKER_NAME=<%= @meta.name %> +ENV JEKYLL_DATA_DIR=/srv/jekyll +ENV JEKYLL_BIN=/usr/jekyll/bin +ENV JEKYLL_ENV=development + +# +# EnvVars +# System +# + +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV TZ=America/Chicago +ENV PATH="$JEKYLL_BIN:$PATH" +ENV LC_ALL=en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US + +# +# EnvVars +# User +# + +<% if @meta.env? %> + ENV <%= @meta.env %> +<% end %> + +# +# EnvVars +# Main +# + +env VERBOSE=false +env FORCE_POLLING=false +env DRAFTS=false + +# +# Packages +# User +# + +<% if @meta.packages? %> + RUN apk --no-cache add <%= @meta.packages %> +<% end %> + +# +# Packages +# Dev +# + +RUN apk --no-cache add \ + zlib-dev \ + libffi-dev \ + build-base \ + libxml2-dev \ + imagemagick-dev \ + readline-dev \ + libxslt-dev \ + libffi-dev \ + yaml-dev \ + zlib-dev \ + vips-dev \ + vips-tools \ + sqlite-dev \ + cmake + +# +# Packages +# Main +# + +RUN apk --no-cache add \ + linux-headers \ + openjdk8-jre \ + less \ + zlib \ + libxml2 \ + readline \ + libxslt \ + libffi \ + git \ + nodejs \ + tzdata \ + shadow \ + bash \ + su-exec \ + npm \ + libressl \ + yarn + +# +# Gems +# Update +# + +RUN echo "gem: --no-ri --no-rdoc" > ~/.gemrc +RUN unset GEM_HOME && unset GEM_BIN && \ + yes | gem update --system + +# +# Gems +# Main +# + +RUN unset GEM_HOME && unset GEM_BIN && yes | gem install --force bundler +RUN gem install jekyll -v<%= @meta.release?? \ + @meta.release : @meta.tag %> -- \ + --use-system-libraries + +# +# Gems +# User +# + +<% if @meta.gems? %> + # Stops slow Nokogiri! + RUN gem install <%=@meta.gems %> -- \ + --use-system-libraries +<% end %> + +RUN addgroup -Sg 1000 jekyll +RUN adduser -Su 1000 -G \ + jekyll jekyll + +# +# Remove development packages on minimal. +# And on pages. Gems are unsupported. +# + +<% if @meta.name == "minimal" || @meta.name == "pages" || @meta.tag == "pages" %> + RUN apk --no-cache del \ + linux-headers \ + openjdk8-jre \ + zlib-dev \ + build-base \ + libxml2-dev \ + libxslt-dev \ + readline-dev \ + imagemagick-dev\ + libffi-dev \ + ruby-dev \ + yaml-dev \ + zlib-dev \ + libffi-dev \ + vips-dev \ + vips-tools \ + cmake +<% end %> + +RUN mkdir -p $JEKYLL_VAR_DIR +RUN mkdir -p $JEKYLL_DATA_DIR +RUN chown -R jekyll:jekyll $JEKYLL_DATA_DIR +RUN chown -R jekyll:jekyll $JEKYLL_VAR_DIR +RUN chown -R jekyll:jekyll $BUNDLE_HOME +RUN rm -rf /home/jekyll/.gem +RUN rm -rf $BUNDLE_HOME/cache +RUN rm -rf $GEM_HOME/cache +RUN rm -rf /root/.gem + +# Work around rubygems/rubygems#3572 +RUN mkdir -p /usr/gem/cache/bundle +RUN chown -R jekyll:jekyll \ + /usr/gem/cache/bundle + +CMD ["jekyll", "--help"] +ENTRYPOINT ["/usr/jekyll/bin/entrypoint"] +WORKDIR /srv/jekyll +VOLUME /srv/jekyll +EXPOSE 35729 +EXPOSE 4000 diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/bundle b/repos/jekyll-docker/copy/all/usr/jekyll/bin/bundle similarity index 91% rename from repos/jekyll/copy/all/usr/jekyll/bin/bundle rename to repos/jekyll-docker/copy/all/usr/jekyll/bin/bundle index 31a7cb3..79459d2 100755 --- a/repos/jekyll/copy/all/usr/jekyll/bin/bundle +++ b/repos/jekyll-docker/copy/all/usr/jekyll/bin/bundle @@ -10,7 +10,7 @@ set -e # this is really rare but can happen during debugs # if [[ ! -f "Gemfile" ]] || [ "$(id -u)" != "0" ]; then - exec $exe "$@" + exec $exe "$@" fi if [ "$1" = "install" ] || [ "$1" = "update" ]; then @@ -18,14 +18,15 @@ if [ "$1" = "install" ] || [ "$1" = "update" ]; then if [ "$1" = "update" ] || ! su-exec jekyll $exe check 1>/dev/null 2>&1; then if [ ! -f "/updated" ] && connected && [ -f ".apk" ]; then apk add --no-cache --no-progress \ - $(cat .apk) + "$(cat .apk)" fi su-exec jekyll $exe config jobs 2 su-exec jekyll $exe config ignore_messages true su-exec jekyll $exe config build.nokogiri --use-system-libraries su-exec jekyll $exe config disable_version_check true - unset DEBUG; su-exec jekyll $exe "$@" + unset DEBUG + su-exec jekyll $exe "$@" su-exec jekyll $exe clean \ 2>/dev/null || true fi diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/connected b/repos/jekyll-docker/copy/all/usr/jekyll/bin/connected similarity index 73% rename from repos/jekyll/copy/all/usr/jekyll/bin/connected rename to repos/jekyll-docker/copy/all/usr/jekyll/bin/connected index 9964a7d..374d902 100755 --- a/repos/jekyll/copy/all/usr/jekyll/bin/connected +++ b/repos/jekyll-docker/copy/all/usr/jekyll/bin/connected @@ -4,9 +4,9 @@ set -e connected=$JEKYLL_VAR_DIR/connected disconnected=$JEKYLL_VAR_DIR/disconnected -[ -f "$disconnected" ] && [ -f "$connected" ] && rm -f "$disconnected" "$connected" +[ -f "$disconnected" ] && [ -f "$connected" ] && rm -f "$disconnected" "$connected" { [ "$CONNECTED" = "false" ] || [ -f "$disconnected" ]; } && exit 1 -{ [ "$CONNECTED" = "true" ] || [ -f "$connected" ]; } && exit 0 +{ [ "$CONNECTED" = "true" ] || [ -f "$connected" ]; } && exit 0 # # If we aren't connected, or forced as connected, or not @@ -19,6 +19,6 @@ if wget -q --spider "$url" -O /dev/null 2>/dev/null; then su-exec jekyll touch "$connected" exit 0 else - su-exec jekyll touch $disconnected + su-exec jekyll touch "$disconnected" exit 1 fi diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/default-args b/repos/jekyll-docker/copy/all/usr/jekyll/bin/default-args similarity index 100% rename from repos/jekyll/copy/all/usr/jekyll/bin/default-args rename to repos/jekyll-docker/copy/all/usr/jekyll/bin/default-args diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/default-gem-permissions b/repos/jekyll-docker/copy/all/usr/jekyll/bin/default-gem-permissions similarity index 100% rename from repos/jekyll/copy/all/usr/jekyll/bin/default-gem-permissions rename to repos/jekyll-docker/copy/all/usr/jekyll/bin/default-gem-permissions diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/entrypoint b/repos/jekyll-docker/copy/all/usr/jekyll/bin/entrypoint similarity index 83% rename from repos/jekyll/copy/all/usr/jekyll/bin/entrypoint rename to repos/jekyll-docker/copy/all/usr/jekyll/bin/entrypoint index 964180c..65a0aa0 100755 --- a/repos/jekyll/copy/all/usr/jekyll/bin/entrypoint +++ b/repos/jekyll-docker/copy/all/usr/jekyll/bin/entrypoint @@ -12,8 +12,8 @@ if [ "$JEKYLL_ROOTLESS" ]; then JEKYLL_GID=0 fi -: ${JEKYLL_UID:=$(id -u jekyll)} -: ${JEKYLL_GID:=$(id -g jekyll)} +: "${JEKYLL_UID:=$(id -u jekyll)}" +: "${JEKYLL_GID:=$(id -g jekyll)}" export JEKYLL_UID export JEKYLL_GID @@ -25,7 +25,7 @@ export JEKYLL_GID # behavior on OS X. # if [ "$JEKYLL_UID" != "0" ] && [ "$JEKYLL_UID" != "$(id -u jekyll)" ]; then - usermod -o -u "$JEKYLL_UID" jekyll + usermod -o -u "$JEKYLL_UID" jekyll groupmod -o -g "$JEKYLL_GID" jekyll chown_args="" @@ -40,8 +40,8 @@ fi # This will most likely end up as 1 # if [ "$JEKYLL_ROOTLESS" ]; then - usermod -o -u $JEKYLL_UID jekyll - groupmod -o -g $JEKYLL_GID jekyll + usermod -o -u "$JEKYLL_UID" jekyll + groupmod -o -g "$JEKYLL_GID" jekyll fi exec "$@" diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/gem b/repos/jekyll-docker/copy/all/usr/jekyll/bin/gem similarity index 100% rename from repos/jekyll/copy/all/usr/jekyll/bin/gem rename to repos/jekyll-docker/copy/all/usr/jekyll/bin/gem diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/jekyll b/repos/jekyll-docker/copy/all/usr/jekyll/bin/jekyll similarity index 85% rename from repos/jekyll/copy/all/usr/jekyll/bin/jekyll rename to repos/jekyll-docker/copy/all/usr/jekyll/bin/jekyll index 2b1ed08..9fd0ebc 100755 --- a/repos/jekyll/copy/all/usr/jekyll/bin/jekyll +++ b/repos/jekyll-docker/copy/all/usr/jekyll/bin/jekyll @@ -34,5 +34,6 @@ ruby --version sup_args="" exe=$BUNDLE_BIN/jekyll [ "$JEKYLL_DOCKER_TAG" = "pages" ] && sup_args="-r github-pages" -[ -x "$exe" ] && exec su-exec jekyll bundle exec ruby $sup_args $exe $args -su-exec jekyll ruby $sup_args "$GEM_BIN/jekyll" $args & wait ${!} +[ -x "$exe" ] && exec su-exec jekyll bundle exec ruby "$sup_args" "$exe" "$args" +su-exec jekyll ruby "$sup_args" "$GEM_BIN/jekyll" "$args" & +wait ${!} diff --git a/repos/builder/opts.yml b/repos/jekyll-docker/opts.yml similarity index 100% rename from repos/builder/opts.yml rename to repos/jekyll-docker/opts.yml diff --git a/repos/minimal/opts.yml b/repos/jekyll-minimal/opts.yml similarity index 100% rename from repos/minimal/opts.yml rename to repos/jekyll-minimal/opts.yml diff --git a/repos/jekyll/Dockerfile b/repos/jekyll/Dockerfile index dc4afabc1f8a37a1061f5ccaad0890a2577bb1e4..4512113030903a3237655a206db4b8ea57085cfd 100644 GIT binary patch literal 1024 zcmaKqL1+_E5Qb;lRANy`(`r2^KBVYrP144+Du^cA;Rv$9D`Vd z8|P>&!Cwpd`uW?=>C#S~eU=wv$ij~EI=}>sg@tQP9X7#9@i*JPryDo#dD`=Ry%988 zLM(P2}s>koY2UJq(@9U^AV3H9B8&oQ;j(Si-n*F=hI zaR@ihd;xkDdJB4AYzHO%bPk$@a$h{-{C51rnJuDYa4npGR3s;((};}apoKx9 zBzhlCo4fJsSxoMy>~9?;;_01FrBbuV^INW#RjE=d;15yP!a$WWDwF%N)gA0b%6+`M zzrUTc&wikGPU@X=i@9{x&Di1jv{e5J!Mr_i~6VEg&Ol)s;j{PELP&XD<@V z#p&sTZSBnN>^HY>$Jd@agmhpoZ$0`snMaAgB=G8eV_>(P0VIBu7WhLLG(S=n z(iGYx{7m8)-aU!+2a;~KOG4IpE28h4jgC8hfPiLOFdL1t#u+&2=FVq1etG5N7DWwb zbO-I(s5@}xH}24}%ra+YOanhQAImh1iN3=gkLMkCblvZLdtbLdvD;{IJg}$Nt~Z?D z+uo=@>P@VIm3tQ3{n4>0^D#=rwLNDzuXij-vZvU=MUB|*&Dsy{cxoB<7l-clc_=G? zKRUM$gTegH_U7HbXPFzHnNMWBjbmX(sk?6H*74?3yJzk4Qus@r5FWM4isMcC?nv9i zNK7z&S63>RY7LiaeQZNr)p3Wz{#01{w2TU1WMgEQE&_(JAuL*K;l{DMpIUjrqU->N zvN5tTi95WhpNI<50C(-FE&a~f=7isMz-374m@9wLk`5%^ITny*e=hx zs3|RV=JsH4@`97X-K~ePXE|XU^t)FOEmWScnXY({0eJLwF-18S<5rS}{0k52tu@3R z<+k{~JI8Cg6USQkaZZE;`=NuK;SL7a5SqN}+1JyF5(tZ9KUibc@@_o^FH>rT(VLCH z&(>HfDK!E=SP}5UP=j6VKY?AlsY^B-`wQ0o#9(}hqelZP0QdsG7mKJ~K9*4&8l1c; z?Q;^psnvqeuoI(TUCS8p!x%}e7NE)JJTCOLe#O>L;##+dWfNt2tr3fY(l{4L^1tJ# z*xeB%{+h_VX}(v9`-by~w0t&Jh?y{HnPwz?3fFIqC#IYxxzuoQdKkoaBNS>sv;!EfkzL4fCKct_YWu-x$Ngz*UiTI1RGlUY0#nxx3^tVS6 zQBfHh6pYBdCBce96M6Jf)(?x+-;f4Pcn|-WEmX2V)J2)*qyWy%oPy!?YuHJ!LAijV z-;x}@0v>}>+=Ui%Ne-gA6%IY-J2NjD-WiS3yzueqGmHgg0Rj11F@ca@TInT=fw9>& z@Q$E4PWj-TCTX-Td;$C@bD|tDcxZhVVQcEHoN7`;lB)(igGoWN9P${mH==90j9By? z0^kYI5hGBEi66#p{Z9}Y6N%Cd!zH6-2F7FwKU`c~fO_1N5*=aa(4>?~qbFQcaZ+1_ zUmi*5hJeQQP?HD_A4!yAL&q)TCmV?nB^jry7C?^!_pu)^qh*#+R*(?4?bEAxnk);N z%1#r$epSh+Rl=aA;7=z%qU3^{g;)E;7ZO?ZoSzQ+72v324>%35miA~&(A*x8Nr}!< zfUordkpUd=9j~?{%EW^>iq*V@eWMfH5i~44oecr@SWhi?yaynu?w~}Hbr>-)GN>L_ zH4BOEIZ{>=gU}*Vd``jeR8d{3x~UBPpS}8}FPYV5Q*k{@z+ek7S2Q7NcoE#BE6=q< zrg#eXv=wt5t4u~|AuWQ6XHK=`<`yBJ@K^X`??l1 zT13YrciU^-X_tv6#9t}em7vkYN}^MyUe`B#->wFgx(*RD`-FNu;C*-o-nSC0ZzyIo z=b@RGpm(7Up-;s=haHE;F!$*P0EqG12hpMX{wvK>4D!v%n?rtS;v;Thkas>0`(O8m z{S&_reT5pH^8@TB=r`yd^bhnT&T1`$ z=zKfZ-uy)EWvO?rFJw~lZraY~=CbyD-d(Vr#aoV@aq{`x?5yiLbB;O7Gp>RDm>RYm z<5`lhDQ29t+VIN2Xg%BiNm%u3=6b;t=+-;IGF!4%gjCzzj>C6U|;(G1KQYbvH$=8 literal 0 HcmV?d00001 diff --git a/repos/jekyll/opts.yml b/repos/jekyll/opts.yml index 3b44798..368793f 100644 --- a/repos/jekyll/opts.yml +++ b/repos/jekyll/opts.yml @@ -1,6 +1,6 @@ aliases: - builder: jekyll/builder:latest - minimal: jekyll/minimal:latest + builder: jvconseil/jekyll-builder:latest + minimal: jvconseil/jekyll-minimal:latest gems: all: - html-proofer diff --git a/repos/minimal/Dockerfile b/repos/minimal/Dockerfile deleted file mode 120000 index 0f40514..0000000 --- a/repos/minimal/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -../jekyll/Dockerfile \ No newline at end of file diff --git a/repos/minimal/copy b/repos/minimal/copy deleted file mode 120000 index f9b3c8f..0000000 --- a/repos/minimal/copy +++ /dev/null @@ -1 +0,0 @@ -../jekyll/copy \ No newline at end of file From 5aa8cd3a4b22a84b4996eb17628eb935868ff808 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Sat, 26 Aug 2023 17:18:59 +0200 Subject: [PATCH 15/29] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6d85e77..ffa20ac 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ # Jekyll Docker -![Docker Pulls](https://img.shields.io/docker/pulls/jvconseil/jekyll-docker?logo=docker) -![Docker Stars](https://img.shields.io/docker/stars/jvconseil/jekyll-docker?logo=docker&color=orange) +[![Docker Pulls](https://img.shields.io/docker/pulls/jvconseil/jekyll-docker?logo=docker)](https://hub.docker.com/r/jvconseil/jekyll-docker) +[![Docker Stars](https://img.shields.io/docker/stars/jvconseil/jekyll-docker?logo=docker&color=orange)](https://hub.docker.com/r/jvconseil/jekyll-docker) [![Deploy](https://github.com/JV-conseil/jekyll-docker/actions/workflows/deploy.yml/badge.svg)](https://github.com/JV-conseil/jekyll-docker/actions/workflows/deploy.yml) ![visitors](https://visitor-badge.laobi.icu/badge?page_id=JV-conseil.jekyll-docker) [![License EUPL 1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](LICENSE) From 3f9193cee352264af21966a0918fa920b443ac70 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Sat, 26 Aug 2023 17:23:24 +0200 Subject: [PATCH 16/29] .github/workflows/build.yml --- .github/FUNDING.yml | 3 -- .github/dependabot.yml | 6 ---- .../build.yml | 30 ++++++++++++++----- .github/workflows/deploy.yml | 5 ++-- 4 files changed, 25 insertions(+), 19 deletions(-) delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/dependabot.yml rename .github/{workflows-disabled => workflows}/build.yml (60%) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 8ecdadc..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -github: JV-conseil -# ko_fi: jvconseil -# custom: ["https://www.paypal.com/donate/?hosted_button_id=P3DGL6EANDY96", "https://paypal.me/jvconseil"] diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 5ace460..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" diff --git a/.github/workflows-disabled/build.yml b/.github/workflows/build.yml similarity index 60% rename from .github/workflows-disabled/build.yml rename to .github/workflows/build.yml index aa52586..dcc9199 100644 --- a/.github/workflows-disabled/build.yml +++ b/.github/workflows/build.yml @@ -1,11 +1,20 @@ -name: 'Pull' +# Deploy to Docker Hub +# See +# Copyright (c) 2019-2023 JV-conseil, All rights reserved +name: "Build" + on: - - pull_request + push: + branches: + - dev + jobs: build: runs-on: ubuntu-latest timeout-minutes: 360 - name: 'Build' + + name: "Build" + strategy: matrix: env: @@ -13,20 +22,25 @@ jobs: - builder:latest - minimal:latest - jekyll:pages + steps: - uses: actions/checkout@v3 - - name: 'Setup Ruby' + + - name: "Setup Ruby" uses: ruby/setup-ruby@v1 with: - ruby-version: ${{ matrix.ruby }} + ruby-version: 2.7.0 bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - run: bundle install - - run: | + + - name: "Docker Experimental" + run: | echo $'{\n "experimental": true\n}' | \ sudo tee /etc/docker/daemon.json sudo systemctl restart docker - name: 'docker experimental' - - run: docker-template build $DOCKER_REPO --no-push --force --squash + + - run: bundle exec docker-template build $DOCKER_REPO --no-push --force --squash env: RUBYOPT: "-W0" DOCKER_REPO: "${{join(matrix.env, ' ')}}" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5708ea6..148ec95 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -50,11 +50,12 @@ jobs: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - run: bundle install - - run: | + + - name: "Docker Experimental" + run: | echo $'{\n "experimental": true\n}' | \ sudo tee /etc/docker/daemon.json sudo systemctl restart docker - name: "Docker Experimental" # - name: 'docker login' # run: | From 54e5367eaa6e53e12bd3db5ff7f5948acacd1f64 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Sat, 26 Aug 2023 17:25:23 +0200 Subject: [PATCH 17/29] Update build.yml --- .github/workflows/build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dcc9199..6767fbf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,10 +18,11 @@ jobs: strategy: matrix: env: - - jekyll:latest - - builder:latest - - minimal:latest - - jekyll:pages + # - jekyll:latest + # - builder:latest + # - minimal:latest + # - jekyll:pages + - jekyll-docker:latest steps: - uses: actions/checkout@v3 From 06d7be3bdd68cdec30c8727276c705cda57692a1 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Sat, 26 Aug 2023 17:30:24 +0200 Subject: [PATCH 18/29] Update build.yml --- .github/workflows/build.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6767fbf..c6e336e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,10 +3,7 @@ # Copyright (c) 2019-2023 JV-conseil, All rights reserved name: "Build" -on: - push: - branches: - - dev +on: pull-request jobs: build: From 779b9a3ab61e6cefa09e847ae6a3ef72178d32fe Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Sat, 26 Aug 2023 17:32:13 +0200 Subject: [PATCH 19/29] .github/workflows/build.yml --- .github/{workflows => workflows-disabled}/build.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{workflows => workflows-disabled}/build.yml (100%) diff --git a/.github/workflows/build.yml b/.github/workflows-disabled/build.yml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows-disabled/build.yml From 02672562aa4be95cba376e8957c09227eb534c28 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Sat, 26 Aug 2023 18:05:31 +0200 Subject: [PATCH 20/29] repos/jekyll-docker/copy --- Gemfile | 2 +- .../copy/all/usr/jekyll/bin/bundle | 7 +++---- .../copy/all/usr/jekyll/bin/connected | 6 +++--- .../copy/all/usr/jekyll/bin/entrypoint | 10 +++++----- .../copy/all/usr/jekyll/bin/jekyll | 5 ++--- repos/jekyll-minimal/Dockerfile | Bin 0 -> 1024 bytes repos/jekyll-minimal/copy | Bin 0 -> 1016 bytes repos/jekyll/Dockerfile | Bin 1024 -> 1024 bytes repos/jekyll/copy | Bin 1016 -> 1016 bytes 9 files changed, 14 insertions(+), 16 deletions(-) create mode 100644 repos/jekyll-minimal/Dockerfile create mode 100644 repos/jekyll-minimal/copy diff --git a/Gemfile b/Gemfile index cd5a4c5..1efecc3 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" gem "docker-template" group :development do - gem 'envygeeks-rubocop' + gem "envygeeks-rubocop" unless ENV["CI"] == "true" gem "travis" gem "pry" diff --git a/repos/jekyll-docker/copy/all/usr/jekyll/bin/bundle b/repos/jekyll-docker/copy/all/usr/jekyll/bin/bundle index 79459d2..31a7cb3 100755 --- a/repos/jekyll-docker/copy/all/usr/jekyll/bin/bundle +++ b/repos/jekyll-docker/copy/all/usr/jekyll/bin/bundle @@ -10,7 +10,7 @@ set -e # this is really rare but can happen during debugs # if [[ ! -f "Gemfile" ]] || [ "$(id -u)" != "0" ]; then - exec $exe "$@" + exec $exe "$@" fi if [ "$1" = "install" ] || [ "$1" = "update" ]; then @@ -18,15 +18,14 @@ if [ "$1" = "install" ] || [ "$1" = "update" ]; then if [ "$1" = "update" ] || ! su-exec jekyll $exe check 1>/dev/null 2>&1; then if [ ! -f "/updated" ] && connected && [ -f ".apk" ]; then apk add --no-cache --no-progress \ - "$(cat .apk)" + $(cat .apk) fi su-exec jekyll $exe config jobs 2 su-exec jekyll $exe config ignore_messages true su-exec jekyll $exe config build.nokogiri --use-system-libraries su-exec jekyll $exe config disable_version_check true - unset DEBUG - su-exec jekyll $exe "$@" + unset DEBUG; su-exec jekyll $exe "$@" su-exec jekyll $exe clean \ 2>/dev/null || true fi diff --git a/repos/jekyll-docker/copy/all/usr/jekyll/bin/connected b/repos/jekyll-docker/copy/all/usr/jekyll/bin/connected index 374d902..9964a7d 100755 --- a/repos/jekyll-docker/copy/all/usr/jekyll/bin/connected +++ b/repos/jekyll-docker/copy/all/usr/jekyll/bin/connected @@ -4,9 +4,9 @@ set -e connected=$JEKYLL_VAR_DIR/connected disconnected=$JEKYLL_VAR_DIR/disconnected -[ -f "$disconnected" ] && [ -f "$connected" ] && rm -f "$disconnected" "$connected" +[ -f "$disconnected" ] && [ -f "$connected" ] && rm -f "$disconnected" "$connected" { [ "$CONNECTED" = "false" ] || [ -f "$disconnected" ]; } && exit 1 -{ [ "$CONNECTED" = "true" ] || [ -f "$connected" ]; } && exit 0 +{ [ "$CONNECTED" = "true" ] || [ -f "$connected" ]; } && exit 0 # # If we aren't connected, or forced as connected, or not @@ -19,6 +19,6 @@ if wget -q --spider "$url" -O /dev/null 2>/dev/null; then su-exec jekyll touch "$connected" exit 0 else - su-exec jekyll touch "$disconnected" + su-exec jekyll touch $disconnected exit 1 fi diff --git a/repos/jekyll-docker/copy/all/usr/jekyll/bin/entrypoint b/repos/jekyll-docker/copy/all/usr/jekyll/bin/entrypoint index 65a0aa0..964180c 100755 --- a/repos/jekyll-docker/copy/all/usr/jekyll/bin/entrypoint +++ b/repos/jekyll-docker/copy/all/usr/jekyll/bin/entrypoint @@ -12,8 +12,8 @@ if [ "$JEKYLL_ROOTLESS" ]; then JEKYLL_GID=0 fi -: "${JEKYLL_UID:=$(id -u jekyll)}" -: "${JEKYLL_GID:=$(id -g jekyll)}" +: ${JEKYLL_UID:=$(id -u jekyll)} +: ${JEKYLL_GID:=$(id -g jekyll)} export JEKYLL_UID export JEKYLL_GID @@ -25,7 +25,7 @@ export JEKYLL_GID # behavior on OS X. # if [ "$JEKYLL_UID" != "0" ] && [ "$JEKYLL_UID" != "$(id -u jekyll)" ]; then - usermod -o -u "$JEKYLL_UID" jekyll + usermod -o -u "$JEKYLL_UID" jekyll groupmod -o -g "$JEKYLL_GID" jekyll chown_args="" @@ -40,8 +40,8 @@ fi # This will most likely end up as 1 # if [ "$JEKYLL_ROOTLESS" ]; then - usermod -o -u "$JEKYLL_UID" jekyll - groupmod -o -g "$JEKYLL_GID" jekyll + usermod -o -u $JEKYLL_UID jekyll + groupmod -o -g $JEKYLL_GID jekyll fi exec "$@" diff --git a/repos/jekyll-docker/copy/all/usr/jekyll/bin/jekyll b/repos/jekyll-docker/copy/all/usr/jekyll/bin/jekyll index 9fd0ebc..2b1ed08 100755 --- a/repos/jekyll-docker/copy/all/usr/jekyll/bin/jekyll +++ b/repos/jekyll-docker/copy/all/usr/jekyll/bin/jekyll @@ -34,6 +34,5 @@ ruby --version sup_args="" exe=$BUNDLE_BIN/jekyll [ "$JEKYLL_DOCKER_TAG" = "pages" ] && sup_args="-r github-pages" -[ -x "$exe" ] && exec su-exec jekyll bundle exec ruby "$sup_args" "$exe" "$args" -su-exec jekyll ruby "$sup_args" "$GEM_BIN/jekyll" "$args" & -wait ${!} +[ -x "$exe" ] && exec su-exec jekyll bundle exec ruby $sup_args $exe $args +su-exec jekyll ruby $sup_args "$GEM_BIN/jekyll" $args & wait ${!} diff --git a/repos/jekyll-minimal/Dockerfile b/repos/jekyll-minimal/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..dfd29ba96bf0b7543b988bcd738d8bab664c3598 GIT binary patch literal 1024 zcmaKqL1+_E5Qb-)RMMi5rfNMXE>h5gYmzpmT@f)!S4%PA!R974Nw;*HHCr}`D0ry1 z9=v$ZQEwhR>P3RIpyHtikDf~JDpb6P@t>D@iSgjT?0hrx=Dm6Iwh{z2g4{2M%FcsX z-$ytajq{h~&AZ6Yi^bhs&m(#{f-IZ}uLF$27zWXD!wnnYg!mgR-*f9L4?NfNeRnOW zH;Il&?xxpVY*mQH#a}8})u7(MN}^-B-mN|IeQPzS*4z*=eNO0Z27HdLT~G_wJl`cU zxfX|T^UPPFx1jf+55;c7#-LI3f8s6xqW#vPx_sY%=5jZKd}HF;kY67EfN2c!uVWvF z{I~!37qY#)i5l*62lg}c0D1_GVvfh5)6fi*`{Ehrc4BAFZxNk>Yv2T=l$=$k5oyao z1A{_|dLLe=@5Zxd(YYV8zcEI{)4P&PCZ~|+w_GZj#d0-|Kg7Hp24*pBrnCE7?fzb5 zI#2hcUiG(o>BV={PD{Ogc`lpEIB6@FpUqjBf-`5?^EYfOYZnUnnHk5iXKj6#CtL&l zIyr1P#=RtAQ_Q&QYTc^<`}b%5pYSYyce`EQi{&Jg|LnH%@K1pkBpC-k7QPPlh3|l$ z3orl0C2(8fBPP+hyu~Q^lf>iTFTxYx)3PQ3{w48A@KK4I;6>pSSnqFih+gS^z(^@c cbci|V2U9?7)c^nh literal 0 HcmV?d00001 diff --git a/repos/jekyll-minimal/copy b/repos/jekyll-minimal/copy new file mode 100644 index 0000000000000000000000000000000000000000..7d791c2c49231bb86bd2d463fce0594c531a6cb5 GIT binary patch literal 1016 zcmZva&ubG=5XWcRRANy`(`r2^K12|qYm&C6T`AHetV%K9!N!Y4^Wz29tl6?j#NO)7 zgBPL49u@o(dJxH>Jt!V}@aW02phCrq7{9Zfmo(zQ?0jbC&AfSUUnK|{1bJKzBfAJ@ z?T&IZmf$bT{d@Flrnr|o^oU-KAPZ-d*8#?0EQ@HhrNb6DDgL95@9E})C!Y3vU)O_X zo9LM2ZhGxooeI&o_$wv58Z=v2Np#ZG>&Axf+qIzD&>>=GpHQy{ybsU7`&NVX4aJP+ zJT&tX^fvS%^r_hAuyJS%bDvrRK#boxhz{NNUuvFWkZ(;~AM(rN?{N!*{7(GCkpJ!< z|8n*)uTaBtzJ>h={S5sI{S7^Vvz&#_KzS}cU~V^l?$RdF8Mqd9h&BPA7cdqfvT#A> zzo13`EPUrICiheNTgQp&p0BT^QmJX=`7T#Vs#vb(@iNq%Fi^#e%4EN6ZufhUa$oEp zop0~T>mR7SDD}?Og=~7>&Dgp8T+W^^xC^$kc*C)?PN9&WopoJj&M{|s#x>Aylf#x{ zJWC2T&5X0wnqCDMt!Mi`32T1c+|Ly1|MYr2?!|H%$}f5=^6-|xOOi~0+rrD>n($rl zw(#l^E`hfsKBDl(WYaP5uEZ1IPr?)6DOr;QA4q%>9Fw>LFAJx^roYuCdSm*4k%}bQ cCEAg=wLe&&0P}xlnf^}1Z=U4>*q8o)0V;B9iU0rr literal 0 HcmV?d00001 diff --git a/repos/jekyll/Dockerfile b/repos/jekyll/Dockerfile index 4512113030903a3237655a206db4b8ea57085cfd..1de94336a2211966bb655dac1e03dcfec93f96e9 100644 GIT binary patch delta 34 ocmZqRXyBNj!pQ&xm%2g)bT{g{GcswIO)g{1V`SX?lu?=q0Fk!{asU7T delta 34 qcmZqRXyBNj!pX?Mz_54K!49>Jy6%ij2RJ5|G3GHcZGOrq%>)3c{0YVY diff --git a/repos/jekyll/copy b/repos/jekyll/copy index 93cd8ad3ee9644d17b7fdf9acc7457b61ece7527..5e3d18fe91f810e82c0c1b6b237d4da5824f821f 100644 GIT binary patch delta 57 xcmeyt{)2sj25bG-AOYQty7G+5J2*};F#rJv5VJ5dFziF)Ynq+foX^dG@JTV6iN!~g^wK+M9-z;NvYDxdrN$<6tUolF4qK@RQ! From cd8392ccdc5a29e74c3a0ff0a7b017149ff6c28b Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Sun, 27 Aug 2023 19:19:25 +0200 Subject: [PATCH 21/29] .ruby-version --- .bash/bundle.sh | 34 ++++++++++++ .github/workflows-disabled/build.yml | 4 +- .github/workflows/deploy.yml | 13 +++-- .ruby-version | 2 +- .travis.yml | 77 +++++++++++++--------------- .vscode/tasks.json | 25 +++------ Gemfile | 2 + README.md | 40 ++++++--------- repos/jekyll-docker/Dockerfile | 4 +- repos/jekyll-docker/opts.yml | 27 ++++++---- script/build | 11 ---- script/deploy | 9 ---- script/sync | 74 -------------------------- 13 files changed, 123 insertions(+), 199 deletions(-) create mode 100755 .bash/bundle.sh delete mode 100755 script/build delete mode 100755 script/deploy delete mode 100755 script/sync diff --git a/.bash/bundle.sh b/.bash/bundle.sh new file mode 100755 index 0000000..bc96954 --- /dev/null +++ b/.bash/bundle.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +# -*- coding: UTF-8 -*- +# +# author : JV-conseil +# credits : JV-conseil +# copyright : Copyright (c) 2019-2023 JV-conseil +# All rights reserved +#==================================================== +set -Eeou pipefail +shopt -s failglob + +_jvcl_::gem_update() { + local _gem _gems=("bundler") + # gem update --system + for _gem in "${_gems[@]}"; do + echo "Checking if ${_gem} is installed..." + gem info "${_gem}" || gem install "${_gem}" + gem update "${_gem}" + done +} + +_jvcl_::bundle_update() { + local _opt + for _opt in "check" "doctor" "install" "update" "lock"; do + bundle "${_opt}" --verbose || : + done +} + +# Bash equivalent of Python if __name__ == "__main__": +# +if [ "${BASH_SOURCE[0]}" = "${0}" ]; then + _jvcl_::gem_update + _jvcl_::bundle_update +fi diff --git a/.github/workflows-disabled/build.yml b/.github/workflows-disabled/build.yml index c6e336e..97c200e 100644 --- a/.github/workflows-disabled/build.yml +++ b/.github/workflows-disabled/build.yml @@ -16,8 +16,7 @@ jobs: matrix: env: # - jekyll:latest - # - builder:latest - # - minimal:latest + # - jekyll-minimal:latest # - jekyll:pages - jekyll-docker:latest @@ -27,7 +26,6 @@ jobs: - name: "Setup Ruby" uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7.0 bundler-cache: true # runs 'bundle install' and caches installed gems automatically - run: bundle install diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 148ec95..4b45a00 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,13 +31,13 @@ jobs: - jekyll-docker:4.0 - jekyll-docker:4 # - - # - minimal:4.3.2 - # - minimal:stable - # - minimal:latest - # - minimal:4.0 - # - minimal:4 + # - jekyll-minimal:4.3.2 + # - jekyll-minimal:stable + # - jekyll-minimal:latest + # - jekyll-minimal:4.0 + # - jekyll-minimal:4 # - jekyll-docker:pages - # - minimal:pages + # - jekyll-minimal:pages # - jekyll:pages steps: @@ -46,7 +46,6 @@ jobs: - name: "Setup Ruby" uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7.0 bundler-cache: true # runs 'bundle install' and caches installed gems automatically - run: bundle install diff --git a/.ruby-version b/.ruby-version index 24ba9a3..6a81b4c 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.0 +2.7.8 diff --git a/.travis.yml b/.travis.yml index ffd0c16..e63faf3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,42 +7,37 @@ os: linux cache: bundler: true directories: - - vendor/bundle + - vendor/bundle branches: only: - - main + - main env: global: - - DOCKER_EMAIL=contact@jv-conseil.net - - DOCKER_USERNAME=jvconseil - # - secure: "\ - # Vp8S6Pevc4pidnNM1NZx/1rCckOFc5C90a/0c6F/fIhGiOfl3o3yaUBKqbBLNTYxYCH8J0Hko\ - # S/Y5Xs2K5XMlsnQXXxeBQntDVMS6XX5q7j65EcK+bRNUxOo2A51rw0jUmPDNa2i7g90sNExjW\ - # XYh03nFe6cbXXHrLdrOt4+A4I= - # " + - DOCKER_EMAIL=contact@jv-conseil.net + - DOCKER_USERNAME=jvconseil jobs: include: - - script: true - stage: precache - - stage: build + - script: true + stage: precache + - stage: build # -- - # jekyll/jekyll + # jvconseil/jekyll # -- - # env: "\ - # DOCKER_REPO='\ - # jekyll:4.3.2 \ - # jekyll:stable \ - # jekyll:latest \ - # jekyll:pages \ - # jekyll:4.0 \ - # jekyll:4 \ - # '\ - # " - # -- - # jvconseil/jekyll-docker - # -- - - env: "\ + env: "\ DOCKER_REPO='\ + jekyll:4.3.2 \ + jekyll:stable \ + jekyll:latest \ + jekyll:pages \ + jekyll:4.0 \ + jekyll:4 \ + '\ + " + # -- + # jvconseil/jekyll-docker + # -- + - env: "\ + DOCKER_REPO='\ jekyll-docker:4.3.2 \ jekyll-docker:stable \ jekyll-docker:latest \ @@ -50,19 +45,19 @@ jobs: jekyll-docker:pages \ jekyll-docker:4.0 \ jekyll-docker:4 \ - '\ - " + '\ + " # -- - # jekyll/minimal + # jvconseil/jekyll-minimal # -- - # - env: "\ - # DOCKER_REPO='\ - # minimal:4.3.2 \ - # minimal:stable \ - # minimal:latest \ - # jekyll:minimal \ - # minimal:pages \ - # minimal:4.0 \ - # minimal:4 \ - # '\ - # " + - env: "\ + DOCKER_REPO='\ + jekyll-minimal:4.3.2 \ + jekyll-minimal:stable \ + jekyll-minimal:latest \ + jvconseil:jekyll-minimal \ + jekyll-minimal:pages \ + jekyll-minimal:4.0 \ + jekyll-minimal:4 \ + '\ + " diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 8315e0a..e465f08 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -11,27 +11,14 @@ "problemMatcher": [], "tasks": [ { - "label": "dist", - "command": "git checkout dist && git pull origin dist && rm -vrf bin cron/record* dev gists img plist && git commit -a -S -m 'signed commit' && git push origin dist", - "detail": "Git push on dist branch" + "label": "build", + "command": "bundle exec docker-template build jekyll-docker:latest --no-push --force --squash", + "detail": "docker-template build jekyll-docker:latest" }, { - "label": "homebrew", - "command": ". ./main.sh ; jv brew", - "detail": "Homebrew installs the stuff you need that Apple (or your Linux system) didn’t", - "problemMatcher": [] + "label": "bundle update", + "command": ".bash/bundle.sh", + "detail": "update bundler and gems" }, - { - "label": "mac", - "osx": { - "command": ". ./main.sh ; _jvcl_::mac_audit ; _jvcl_::launch_monitoring_apps" - }, - "detail": "Audit your mac" - }, - { - "label": "record", - "command": ". ./main.sh ; jv record", - "detail": "Download stream" - } ] } \ No newline at end of file diff --git a/Gemfile b/Gemfile index 1efecc3..6e3e038 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,7 @@ source "https://rubygems.org" +ruby File.read('.ruby-version').strip + gem "docker-template" group :development do diff --git a/README.md b/README.md index ffa20ac..ea0be8d 100644 --- a/README.md +++ b/README.md @@ -22,21 +22,21 @@ Jekyll Docker is a software image that has Jekyll and many of its dependencies r ## Image Types -* `jekyll/jekyll`: Default image. -* `jekyll/minimal`: Very minimal image. +* `jvconseil/jekyll`: Default image. +* `jvconseil/jekyll-minimal`: Very minimal image. * `jvconseil/jekyll-docker`: Includes tools. ### Standard -The standard images (`jekyll/jekyll`) include a default set of "dev" packages, along with Node.js, and other stuff that makes Jekyll easy. It also includes a bunch of default gems that the community wishes us to maintain on the image. +The standard images (`jvconseil/jekyll`) include a default set of "dev" packages, along with Node.js, and other stuff that makes Jekyll easy. It also includes a bunch of default gems that the community wishes us to maintain on the image. #### Usage ```sh -export JEKYLL_VERSION=3.8 +export JEKYLL_VERSION=4.3.2 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ - -it jekyll/jekyll:$JEKYLL_VERSION \ + -it jvconseil/jekyll:$JEKYLL_VERSION \ jekyll build ``` @@ -44,7 +44,7 @@ docker run --rm \ ```cmd set site_name=my-blog -docker run --rm --volume="%CD%:/srv/jekyll" -it jekyll/jekyll sh -c "chown -R jekyll /usr/gem/ && jekyll new %site_name%" && cd %site_name% +docker run --rm --volume="%CD%:/srv/jekyll" -it jvconseil/jekyll sh -c "chown -R jekyll /usr/gem/ && jekyll new %site_name%" && cd %site_name% ``` #### Quick start under Linux / Git Bash @@ -55,7 +55,7 @@ If you are under linux skip `export MSYS_NO_PATHCONV=1`. It is added for compati export site_name="my-blog" && export MSYS_NO_PATHCONV=1 docker run --rm \ --volume="$PWD:/srv/jekyll" \ - -it jekyll/jekyll \ + -it jvconseil/jekyll \ sh -c "chown -R jekyll /usr/gem/ && jekyll new $site_name" \ && cd $site_name ``` @@ -67,7 +67,7 @@ The builder image comes with extra stuff that is not included in the standard im #### Usage ```sh -export JEKYLL_VERSION=3.8 +export JEKYLL_VERSION=4.3.2 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ -it jvconseil/jekyll-docker:$JEKYLL_VERSION \ @@ -83,10 +83,10 @@ The minimal image skips all the extra gems, all the extra dev dependencies and l ***You will need to provide a `.apk` file if you intend to use anything like Nokogiri or otherwise, we do not install any development headers or dependencies so C based gems will fail to install.*** ```sh -export JEKYLL_VERSION=3.8 +export JEKYLL_VERSION=4.3.2 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ - -it jekyll/minimal:$JEKYLL_VERSION \ + -it jvconseil/jekyll-minimal:$JEKYLL_VERSION \ jekyll build ``` @@ -95,7 +95,7 @@ docker run --rm \ If you are using a rootless container management system, you can set the `JEKYLL_ROOTLESS` environment variable to any non-zero value. For example, you can use the following to initialize a new jekyll project in the current directory using [`podman`](https://podman.io/). ```sh -podman run -ti --rm -v .:/srv/jekyll -e JEKYLL_ROOTLESS=1 docker.io/jekyll/jekyll jekyll new . +podman run -ti --rm -v .:/srv/jekyll -e JEKYLL_ROOTLESS=1 docker.io/jvconseil/jekyll jekyll new . ``` ## Server @@ -108,23 +108,23 @@ For local development, Jekyll can be run in server mode inside the container. It docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ --publish [::1]:4000:4000 \ - jekyll/jekyll \ + jvconseil/jekyll \ jekyll serve ``` ## Dependencies -Jekyll Docker will attempt to install any dependencies that you list inside of your `Gemfile`, matching the versions you have in your `Gemfile.lock`, including Jekyll if you have a version that does not match the version of the image you are using (you should be doing `gem "jekyll", "~> 3.8"` so that minor versions are installed if you use say image tag "3.7.3"). +Jekyll Docker will attempt to install any dependencies that you list inside of your `Gemfile`, matching the versions you have in your `Gemfile.lock`, including Jekyll if you have a version that does not match the version of the image you are using (you should be doing `gem "jekyll", "~> 4.3.2"` so that minor versions are installed if you use say image tag "3.7.3"). ### Updating If you provide a `Gemfile` and would like to update your `Gemfile.lock` you can run ```sh -export JEKYLL_VERSION=3.8 +export JEKYLL_VERSION=4.3.2 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ - -it jekyll/jekyll:$JEKYLL_VERSION \ + -it jvconseil/jekyll:$JEKYLL_VERSION \ bundle update ``` @@ -139,11 +139,11 @@ You can enable caching in Jekyll Docker by using a `docker --volume` that points ### Usage ```sh -export JEKYLL_VERSION=3.8 +export JEKYLL_VERSION=4.3.2 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ --volume="$PWD/vendor/bundle:/usr/local/bundle:Z" \ - -it jekyll/jekyll:$JEKYLL_VERSION \ + -it jvconseil/jekyll:$JEKYLL_VERSION \ jekyll build ``` @@ -167,12 +167,6 @@ If you would like to know the CLI options for Jekyll, you can visit [Jekyll's He You can install system packages by providing a file named `.apk` with one package per line. If you need to find out what the package names are for a given command you wish to use you can visit . ***We provide many dependencies for most Ruby stuff by default for `builder` and standard images. This includes `ruby-dev`, `xml`, `xslt`, `git` and other stuff that most Ruby packages might need.*** -## Building - -```sh -script/build -``` - ## Sponsorship If this project helps you, you can offer me a cup of coffee ☕️ :-) diff --git a/repos/jekyll-docker/Dockerfile b/repos/jekyll-docker/Dockerfile index dc4afab..3ce93f9 100644 --- a/repos/jekyll-docker/Dockerfile +++ b/repos/jekyll-docker/Dockerfile @@ -1,5 +1,5 @@ FROM <%= @meta.base_image %> -LABEL maintainer "Jordon Bedwell " +LABEL maintainer "JV conseil " COPY copy / # @@ -9,7 +9,7 @@ COPY copy / ENV BUNDLE_HOME=/usr/local/bundle ENV BUNDLE_APP_CONFIG=/usr/local/bundle -ENV BUNDLE_DISABLE_PLATFORM_WARNINGS=true +ENV BUNDLE_DISABLE_PLATFORM_WARNINGS=truex ENV BUNDLE_BIN=/usr/local/bundle/bin ENV GEM_BIN=/usr/gem/bin ENV GEM_HOME=/usr/gem diff --git a/repos/jekyll-docker/opts.yml b/repos/jekyll-docker/opts.yml index 072bc63..e21ea56 100644 --- a/repos/jekyll-docker/opts.yml +++ b/repos/jekyll-docker/opts.yml @@ -9,21 +9,30 @@ env: JEKYLL_ENV: production gems: all: &gems - - s3_website - html-proofer - - jekyll-sitemap - - jekyll-mentions + - jekyll-avatar - jekyll-coffeescript - - jekyll-sass-converter - - jekyll-redirect-from - - jekyll-paginate - jekyll-compose - - jekyll-feed + - jekyll-default-layout - jekyll-docs - - RedCloth - - kramdown + - jekyll-feed + - jekyll-include-cache + - jekyll-last-modified-at + - jekyll-mentions + - jekyll-optional-front-matter + - jekyll-paginate + - jekyll-readme-index + - jekyll-redirect-from + - jekyll-relative-links + - jekyll-sass-converter + - jekyll-seo-tag + - jekyll-sitemap + - jekyll-titles-from-headings - jemoji + - kramdown - minima + - RedCloth + - s3_website group: pages: - *gems diff --git a/script/build b/script/build deleted file mode 100755 index 59ef193..0000000 --- a/script/build +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -l -# Copyright: 2017 - 2018 - MIT License -# Source: https://github.com/envygeeks/devfiles -# Author: Jordon Bedwell -script/install - -[[ "$1" ]] && export DOCKER_REPO="$1" -echo "$DOCKER_REPO" -exit 0 -bundle exec docker-template build "$DOCKER_REPO" --no-push --force --squash || \ - exit $? diff --git a/script/deploy b/script/deploy deleted file mode 100755 index 5091f43..0000000 --- a/script/deploy +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -l -# Copyright: 2017 - 2018 - MIT License -# Source: https://github.com/envygeeks/devfiles -# Author: Jordon Bedwell -set -e - -if [ "$TRAVIS_PULL_REQUEST" = "false" ] - then bundle exec docker-template push $DOCKER_REPO -fi diff --git a/script/sync b/script/sync deleted file mode 100755 index bf60741..0000000 --- a/script/sync +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -# Copyright: 2017 - 2018 - MIT License -# Source: https://github.com/envygeeks/devfiles -# Author: Jordon Bedwell -# -- - -[ "$DEBUG" = "true" ] && set -x -set -e - -# -- -trim() { - echo "$@" | tr -s " " | \ - sed -e 's/^[[:space:]]*//g' | \ - sed -e 's/[[:space:]]$//g' -} - -# -- -[ -n "$1" ] && git config envygeeks.language "$1" -[ -n "$2" ] && git config envygeeks.external "$2" - -# -- -# Determine what we are working with. -# -- - -skip_if_exists=(Gemfile .travis.yml) -sync_language=$(git config envygeeks.language || echo "") -skip_if_external=(CONTRIBUTING.md CODE_OF_CONDUCT.md .github/codeowners) -skip_if_external+=(.github/issue_template.md .github/pull_request_template.md) -external=$(git config envygeeks.external || echo "false") -github_url=https://github.com/envygeeks/devfiles.git -copy_to=$PWD - -# -- -# Copies everything, except for what's to be skipped if -# it happens to exist, into the current directory, so that -# stays in sync with the parent. -# -- - -clone_dir=$(mktemp -d) -git clone $github_url "$clone_dir" -for d in $(trim global $sync_language); do - cd "$clone_dir" - - [ ! -d "$d" ] && continue - find "$d" -not -path "$d" -type f | while read f; do - to=$(echo "$f" | sed -e "s/$d\///"); dir=$(dirname "$to") - if [ "$dir" != "$d" ] && [ "$dir" != "." ]; then - if [ ! -d "$copy_to/$dir" ]; then - bash -xc "mkdir -p '$copy_to/$dir'" - fi - fi - - skip=false - for sf in "${skip_if_exists[@]}"; do - if [ "$to" = "$sf" ] && [ -f "$copy_to/$sf" ]; then - skip=true - fi - done - - if [ "$skip" = "false" ] && [ "$external" = "true" ]; then - for sf in "${skip_if_external[@]}"; do - if [ "$to" = "$sf" ] && [ -f "$copy_to/$sf" ]; then - skip=true - fi - done - fi - - if [ "$skip" != "true" ]; then - bash -xc "cp -L '$f' '$copy_to/$to'" - fi - done -done - -rm -rf $clone_dir From fe529ec6c297323f19056a32444a268085003a61 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Sun, 27 Aug 2023 19:28:30 +0200 Subject: [PATCH 22/29] Update deploy.yml --- .github/workflows/deploy.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4b45a00..0d21451 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -62,15 +62,18 @@ jobs: # --username ${{ secrets.DOCKER_USERNAME }} \ # --password-stdin - - name: Login to Docker Hub + - name: "Login to Docker Hub" uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - run: | - bundle exec docker-template build $DOCKER_REPO --no-push --force --squash - bundle exec docker-template push $DOCKER_REPO + - name: "docker build" + run: bundle exec docker-template build $DOCKER_REPO --no-push --force --squash + + - name: "docker push" + run: bundle exec docker-template push $DOCKER_REPO + env: RUBYOPT: "-W0" DOCKER_REPO: "${{join(matrix.env, ' ')}}" From 006ec628ea83595114ec1e4b440adaf0207cfdb0 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Sun, 27 Aug 2023 19:32:55 +0200 Subject: [PATCH 23/29] Update deploy.yml --- .github/workflows/deploy.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0d21451..b5aa0d1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -62,18 +62,18 @@ jobs: # --username ${{ secrets.DOCKER_USERNAME }} \ # --password-stdin - - name: "Login to Docker Hub" + - name: Login to Docker Hub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: "docker build" - run: bundle exec docker-template build $DOCKER_REPO --no-push --force --squash - - - name: "docker push" - run: bundle exec docker-template push $DOCKER_REPO + - run: bundle exec docker-template build $DOCKER_REPO --no-push --force --squash + env: + RUBYOPT: "-W0" + DOCKER_REPO: "${{join(matrix.env, ' ')}}" + - run: bundle exec docker-template push $DOCKER_REPO env: RUBYOPT: "-W0" DOCKER_REPO: "${{join(matrix.env, ' ')}}" From da3366dbe589d6747c0867f975d5f70129a31416 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Sun, 27 Aug 2023 19:40:25 +0200 Subject: [PATCH 24/29] Update opts.yml --- opts.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opts.yml b/opts.yml index 86885ea..cd7d459 100644 --- a/opts.yml +++ b/opts.yml @@ -10,4 +10,5 @@ tags: pages: pages releases: tag: - pages: 3.8.5 # 05-15-2020 + # pages: 3.8.5 # 05-15-2020 + pages: 3.9.0 # 27.08.2023 From 1511e585dc9137380adbe389004d68793d254e50 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Sun, 27 Aug 2023 23:12:39 +0200 Subject: [PATCH 25/29] cron: "0 4 1 * *" --- .github/workflows/deploy.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b5aa0d1..7acc67d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,5 +1,5 @@ # Deploy to Docker Hub -# See +# See # Copyright (c) 2019-2023 JV-conseil, All rights reserved name: "Deploy" @@ -7,6 +7,10 @@ on: push: branches: - main + schedule: + # “At 04:00 on day-of-month 1.” See + # * is a special character in YAML so you have to quote this string + - cron: "0 4 1 * *" jobs: build: @@ -56,13 +60,13 @@ jobs: sudo tee /etc/docker/daemon.json sudo systemctl restart docker - # - name: 'docker login' + # - name: "docker login" # run: | # echo "${{ secrets.DOCKER_PASSWORD }}" | docker login \ # --username ${{ secrets.DOCKER_USERNAME }} \ # --password-stdin - - name: Login to Docker Hub + - name: "Login to Docker Hub" uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} From f690c4a0cd977d747068238a4c74865bef5936df Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Mon, 28 Aug 2023 15:04:41 +0200 Subject: [PATCH 26/29] Update deploy.yml --- .github/workflows/deploy.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7acc67d..a785605 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -60,12 +60,6 @@ jobs: sudo tee /etc/docker/daemon.json sudo systemctl restart docker - # - name: "docker login" - # run: | - # echo "${{ secrets.DOCKER_PASSWORD }}" | docker login \ - # --username ${{ secrets.DOCKER_USERNAME }} \ - # --password-stdin - - name: "Login to Docker Hub" uses: docker/login-action@v2 with: @@ -75,9 +69,9 @@ jobs: - run: bundle exec docker-template build $DOCKER_REPO --no-push --force --squash env: RUBYOPT: "-W0" - DOCKER_REPO: "${{join(matrix.env, ' ')}}" + DOCKER_REPO: "${{ join(matrix.env, ' ') }}" - run: bundle exec docker-template push $DOCKER_REPO env: RUBYOPT: "-W0" - DOCKER_REPO: "${{join(matrix.env, ' ')}}" + DOCKER_REPO: "${{ join(matrix.env, ' ') }}" From d013275e83d174c2808bc08bbedbc06662da9d46 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Mon, 28 Aug 2023 15:10:55 +0200 Subject: [PATCH 27/29] base_image: ruby:3.2.2-alpine3.18 --- .bash/bundle.sh | 34 --- .github/FUNDING.yml | 1 + .github/codeowners | 2 +- .github/dependabot.yml | 6 + .github/security | 1 + .github/workflows-disabled/build.yml | 42 --- .github/workflows/build.yml | 30 ++ .github/workflows/deploy.yml | 94 +++--- .travis.yml | 67 ++-- .vscode/extensions.json | 13 - .vscode/settings.json | 45 --- .vscode/shellscript.code-snippets | 120 -------- .vscode/tasks.json | 24 -- COPYING | 13 + LICENSE | 287 ------------------ README.md | 95 +++--- opts.yml | 2 +- repos/builder/Dockerfile | 1 + repos/builder/copy | 1 + repos/{jekyll-docker => builder}/opts.yml | 27 +- repos/jekyll-docker/Dockerfile | 196 ------------ repos/jekyll-minimal/Dockerfile | Bin 1024 -> 0 bytes repos/jekyll-minimal/copy | Bin 1016 -> 0 bytes repos/jekyll/Dockerfile | Bin 1024 -> 3219 bytes repos/jekyll/copy | Bin 1016 -> 0 bytes .../copy/all/usr/jekyll/bin/bundle | 0 .../copy/all/usr/jekyll/bin/connected | 0 .../copy/all/usr/jekyll/bin/default-args | 0 .../usr/jekyll/bin/default-gem-permissions | 0 .../copy/all/usr/jekyll/bin/entrypoint | 0 .../copy/all/usr/jekyll/bin/gem | 0 .../copy/all/usr/jekyll/bin/jekyll | 0 repos/jekyll/opts.yml | 4 +- repos/minimal/Dockerfile | 1 + repos/minimal/copy | 1 + repos/{jekyll-minimal => minimal}/opts.yml | 0 script/build | 11 + script/deploy | 9 + script/sync | 74 +++++ 39 files changed, 271 insertions(+), 930 deletions(-) delete mode 100755 .bash/bundle.sh create mode 100644 .github/FUNDING.yml create mode 100644 .github/dependabot.yml create mode 100644 .github/security delete mode 100644 .github/workflows-disabled/build.yml create mode 100644 .github/workflows/build.yml delete mode 100644 .vscode/extensions.json delete mode 100644 .vscode/settings.json delete mode 100644 .vscode/shellscript.code-snippets delete mode 100644 .vscode/tasks.json create mode 100644 COPYING delete mode 100644 LICENSE create mode 120000 repos/builder/Dockerfile create mode 120000 repos/builder/copy rename repos/{jekyll-docker => builder}/opts.yml (67%) delete mode 100644 repos/jekyll-docker/Dockerfile delete mode 100644 repos/jekyll-minimal/Dockerfile delete mode 100644 repos/jekyll-minimal/copy delete mode 100644 repos/jekyll/copy rename repos/{jekyll-docker => jekyll}/copy/all/usr/jekyll/bin/bundle (100%) rename repos/{jekyll-docker => jekyll}/copy/all/usr/jekyll/bin/connected (100%) rename repos/{jekyll-docker => jekyll}/copy/all/usr/jekyll/bin/default-args (100%) rename repos/{jekyll-docker => jekyll}/copy/all/usr/jekyll/bin/default-gem-permissions (100%) rename repos/{jekyll-docker => jekyll}/copy/all/usr/jekyll/bin/entrypoint (100%) rename repos/{jekyll-docker => jekyll}/copy/all/usr/jekyll/bin/gem (100%) rename repos/{jekyll-docker => jekyll}/copy/all/usr/jekyll/bin/jekyll (100%) create mode 120000 repos/minimal/Dockerfile create mode 120000 repos/minimal/copy rename repos/{jekyll-minimal => minimal}/opts.yml (100%) create mode 100755 script/build create mode 100755 script/deploy create mode 100755 script/sync diff --git a/.bash/bundle.sh b/.bash/bundle.sh deleted file mode 100755 index bc96954..0000000 --- a/.bash/bundle.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -# -*- coding: UTF-8 -*- -# -# author : JV-conseil -# credits : JV-conseil -# copyright : Copyright (c) 2019-2023 JV-conseil -# All rights reserved -#==================================================== -set -Eeou pipefail -shopt -s failglob - -_jvcl_::gem_update() { - local _gem _gems=("bundler") - # gem update --system - for _gem in "${_gems[@]}"; do - echo "Checking if ${_gem} is installed..." - gem info "${_gem}" || gem install "${_gem}" - gem update "${_gem}" - done -} - -_jvcl_::bundle_update() { - local _opt - for _opt in "check" "doctor" "install" "update" "lock"; do - bundle "${_opt}" --verbose || : - done -} - -# Bash equivalent of Python if __name__ == "__main__": -# -if [ "${BASH_SOURCE[0]}" = "${0}" ]; then - _jvcl_::gem_update - _jvcl_::bundle_update -fi diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..1c60d67 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: envygeeks diff --git a/.github/codeowners b/.github/codeowners index c0dc46f..5a22f83 100644 --- a/.github/codeowners +++ b/.github/codeowners @@ -1 +1 @@ -* @JV-conseil +* @envygeeks diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5ace460 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/security b/.github/security new file mode 100644 index 0000000..5a22f83 --- /dev/null +++ b/.github/security @@ -0,0 +1 @@ +* @envygeeks diff --git a/.github/workflows-disabled/build.yml b/.github/workflows-disabled/build.yml deleted file mode 100644 index 97c200e..0000000 --- a/.github/workflows-disabled/build.yml +++ /dev/null @@ -1,42 +0,0 @@ -# Deploy to Docker Hub -# See -# Copyright (c) 2019-2023 JV-conseil, All rights reserved -name: "Build" - -on: pull-request - -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 360 - - name: "Build" - - strategy: - matrix: - env: - # - jekyll:latest - # - jekyll-minimal:latest - # - jekyll:pages - - jekyll-docker:latest - - steps: - - uses: actions/checkout@v3 - - - name: "Setup Ruby" - uses: ruby/setup-ruby@v1 - with: - bundler-cache: true # runs 'bundle install' and caches installed gems automatically - - - run: bundle install - - - name: "Docker Experimental" - run: | - echo $'{\n "experimental": true\n}' | \ - sudo tee /etc/docker/daemon.json - sudo systemctl restart docker - - - run: bundle exec docker-template build $DOCKER_REPO --no-push --force --squash - env: - RUBYOPT: "-W0" - DOCKER_REPO: "${{join(matrix.env, ' ')}}" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0a542af --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: 'Pull' +on: + - pull_request +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 360 + name: 'Build' + strategy: + matrix: + env: + - jekyll:latest + - builder:latest + - minimal:latest + - jekyll:pages + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-ruby@v1 + with: + ruby-version: '2.x' + - run: bundle install + - run: | + echo $'{\n "experimental": true\n}' | \ + sudo tee /etc/docker/daemon.json + sudo systemctl restart docker + name: 'docker experimental' + - run: docker-template build $DOCKER_REPO --no-push --force --squash + env: + RUBYOPT: "-W0" + DOCKER_REPO: "${{join(matrix.env, ' ')}}" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a785605..1a26809 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,77 +1,59 @@ -# Deploy to Docker Hub -# See -# Copyright (c) 2019-2023 JV-conseil, All rights reserved -name: "Deploy" - +name: 'Push' on: push: branches: - - main + - $default-branch schedule: - # “At 04:00 on day-of-month 1.” See - # * is a special character in YAML so you have to quote this string - - cron: "0 4 1 * *" - + - cron: 2 4 10 * * jobs: build: runs-on: ubuntu-latest timeout-minutes: 360 - - name: "Deploy" - + name: 'Build' strategy: fail-fast: false matrix: env: - # - - # - jekyll:4.3.2 - # - jekyll:stable - # - jekyll:latest - # - jekyll:4.0 - # - jekyll:4 - - - jekyll-docker:4.3.2 - - jekyll-docker:stable - - jekyll-docker:latest - - jekyll-docker:4.0 - - jekyll-docker:4 - # - - # - jekyll-minimal:4.3.2 - # - jekyll-minimal:stable - # - jekyll-minimal:latest - # - jekyll-minimal:4.0 - # - jekyll-minimal:4 - # - jekyll-docker:pages - # - jekyll-minimal:pages - # - jekyll:pages - + - + - jekyll:4.2.2 + - jekyll:stable + - jekyll:latest + - jekyll:4.0 + - jekyll:4 + - + - builder:4.2.2 + - builder:stable + - builder:latest + - builder:4.0 + - builder:4 + - + - minimal:4.2.2 + - minimal:stable + - minimal:latest + - minimal:4.0 + - minimal:4 + - builder:pages + - minimal:pages + - jekyll:pages steps: - uses: actions/checkout@v3 - - - name: "Setup Ruby" - uses: ruby/setup-ruby@v1 + - uses: actions/setup-ruby@v1 with: - bundler-cache: true # runs 'bundle install' and caches installed gems automatically - + ruby-version: '2.x' - run: bundle install - - - name: "Docker Experimental" - run: | + - run: | echo $'{\n "experimental": true\n}' | \ sudo tee /etc/docker/daemon.json sudo systemctl restart docker - - - name: "Login to Docker Hub" - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - run: bundle exec docker-template build $DOCKER_REPO --no-push --force --squash - env: - RUBYOPT: "-W0" - DOCKER_REPO: "${{ join(matrix.env, ' ') }}" - - - run: bundle exec docker-template push $DOCKER_REPO + name: 'docker experimental' + - name: 'docker login' + run: | + echo "${{secrets.DOCKER_PASSWORD}}" | docker login \ + --username ${{secrets.DOCKER_USERNAME}} \ + --password-stdin + - run: | + docker-template build $DOCKER_REPO --no-push --force --squash + docker-template push $DOCKER_REPO env: RUBYOPT: "-W0" - DOCKER_REPO: "${{ join(matrix.env, ' ') }}" + DOCKER_REPO: "${{join(matrix.env, ' ')}}" diff --git a/.travis.yml b/.travis.yml index e63faf3..aa60836 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,25 +7,30 @@ os: linux cache: bundler: true directories: - - vendor/bundle + - vendor/bundle branches: only: - - main + - master env: global: - - DOCKER_EMAIL=contact@jv-conseil.net - - DOCKER_USERNAME=jvconseil + - DOCKER_EMAIL=jordon@envygeeks.io + - DOCKER_USERNAME=envygeeks + - secure: "\ + Vp8S6Pevc4pidnNM1NZx/1rCckOFc5C90a/0c6F/fIhGiOfl3o3yaUBKqbBLNTYxYCH8J0Hko\ + S/Y5Xs2K5XMlsnQXXxeBQntDVMS6XX5q7j65EcK+bRNUxOo2A51rw0jUmPDNa2i7g90sNExjW\ + XYh03nFe6cbXXHrLdrOt4+A4I= + " jobs: include: - - script: true - stage: precache - - stage: build + - script: true + stage: precache + - stage: build # -- - # jvconseil/jekyll + # jekyll/jekyll # -- env: "\ DOCKER_REPO='\ - jekyll:4.3.2 \ + jekyll:4.2.2 \ jekyll:stable \ jekyll:latest \ jekyll:pages \ @@ -33,31 +38,31 @@ jobs: jekyll:4 \ '\ " - # -- - # jvconseil/jekyll-docker - # -- - - env: "\ - DOCKER_REPO='\ - jekyll-docker:4.3.2 \ - jekyll-docker:stable \ - jekyll-docker:latest \ - jvconseil:jekyll-docker \ - jekyll-docker:pages \ - jekyll-docker:4.0 \ - jekyll-docker:4 \ - '\ - " # -- - # jvconseil/jekyll-minimal + # jekyll/builder + # -- + - env: "\ + DOCKER_REPO='\ + builder:4.2.2 \ + builder:stable \ + builder:latest \ + jekyll:builder \ + builder:pages \ + builder:4.0 \ + builder:4 \ + '\ + " + # -- + # jekyll/minimal # -- - env: "\ DOCKER_REPO='\ - jekyll-minimal:4.3.2 \ - jekyll-minimal:stable \ - jekyll-minimal:latest \ - jvconseil:jekyll-minimal \ - jekyll-minimal:pages \ - jekyll-minimal:4.0 \ - jekyll-minimal:4 \ + minimal:4.2.2 \ + minimal:stable \ + minimal:latest \ + jekyll:minimal \ + minimal:pages \ + minimal:4.0 \ + minimal:4 \ '\ " diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 4d2b71c..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "recommendations": [ - "dbaeumer.vscode-eslint", - "editorconfig.editorconfig", - "timonwong.shellcheck", - "yzhang.markdown-all-in-one", - "davidanson.vscode-markdownlint", - "foxundermoon.shell-format", - "bierner.markdown-emoji", - "esbenp.prettier-vscode", - "dotjoshjohnson.xml" - ] -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 6cd46c5..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "[css][scss][less]": { - "editor.defaultFormatter": "vscode.css-language-features" - }, - "[html]": { - "editor.defaultFormatter": "vscode.html-language-features" - }, - "[javascript]": { - "editor.defaultFormatter": "vscode.typescript-language-features" - }, - "[jsonc]": { - "editor.defaultFormatter": "vscode.json-language-features" - }, - "[markdown]": { - "editor.defaultFormatter": "yzhang.markdown-all-in-one" - }, - "editor.bracketPairColorization.enabled": false, - "editor.formatOnSave": true, - "editor.matchBrackets": "always", - "editor.wordWrap": "on", - "files.eol": "\n", - "html.format.indentHandlebars": true, - "html.format.indentInnerHtml": true, - "html.format.templating": true, - "scss.format.braceStyle": "collapse", - "scss.format.enable": false, - "shellformat.effectLanguages": [ - "shellscript", - "dockerfile", - "dotenv", - "hosts", - "jvmoptions", - "ignore", - "gitignore", - "properties", - "spring-boot-properties", - "azcli", - "bats" - ], - "shellformat.useEditorConfig": true, - "task.allowAutomaticTasks": "on", - "terminal.integrated.defaultProfile.linux": "bash", - "terminal.integrated.defaultProfile.osx": "bash", - "terminal.integrated.defaultProfile.windows": "bash" -} \ No newline at end of file diff --git a/.vscode/shellscript.code-snippets b/.vscode/shellscript.code-snippets deleted file mode 100644 index a8607df..0000000 --- a/.vscode/shellscript.code-snippets +++ /dev/null @@ -1,120 +0,0 @@ -{ - // Place your snippets for shellscript here. Each snippet is defined under a snippet name and has a prefix, body and - // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: - // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the - // same ids are connected. - // Example: - // "Print to console": { - // "prefix": "log", - // "body": [ - // "console.log('$1');", - // "$2" - // ], - // "description": "Log output to console" - // } - "bash": { - "prefix": [ - // "bash", - // "#!", - "shebang" - ], - "body": [ - "#!/usr/bin/env bash", - "# -*- coding: UTF-8 -*-", - "#", - "# author : JV-conseil", - "# credits : JV-conseil", - "# copyright : Copyright (c) 2019-2023 JV-conseil", - "# All rights reserved", - "#====================================================", - "", - ], - "description": "Shebang Bash executor" - }, - "function": { - "prefix": [ - "_jvcl_::", - "function" - ], - "body": [ - "_jvcl_::${1:generic_function}() {", - "\tlocal _arg=\"\\${1:-\"something\"}\"", - "\tif cmd; then", - "\t\t_arg=\"something else\"", - "\t\ttrue", - "\telse", - "\t\tfalse", - "\tfi", - "}", - ], - "description": [ - "This defines a generic function _jvcl_::generic_function() {}.\n", - "The reserved word function is optional.\n", - "If the function reserved word is supplied, the parentheses are optional.\n", - "1. Recommended way:\n", - "name() {}\n", - "2. C-like-way:\nfunction name [()] {}" - ] - }, - "array_loop": { - "prefix": [ - "for_array", - ], - "body": [ - "for _item in \"${MY_ARRAY[@]}\"; do", - "\techo \"${_item}\"", - "done", - ], - "description": [ - "Loop through an array", - ] - }, - "cat": { - "prefix": [ - "cat", - ], - "body": [ - "cat < +[![Github Workflow Status](https://img.shields.io/github/workflow/status/envygeeks/jekyll-docker/Push?style=for-the-badge)](https://github.com/envygeeks/jekyll-docker/actions) [![Donate](https://img.shields.io/badge/DONATE-MONEY-yellow.svg?style=for-the-badge)](https://envygeeks.io#donate) [![Docker Stars](https://img.shields.io/docker/stars/jekyll/jekyll.svg?style=for-the-badge)]() [![Docker Pulls](https://img.shields.io/docker/pulls/jekyll/jekyll.svg?style=for-the-badge)]() - -Jekyll - - - # Jekyll Docker -[![Docker Pulls](https://img.shields.io/docker/pulls/jvconseil/jekyll-docker?logo=docker)](https://hub.docker.com/r/jvconseil/jekyll-docker) -[![Docker Stars](https://img.shields.io/docker/stars/jvconseil/jekyll-docker?logo=docker&color=orange)](https://hub.docker.com/r/jvconseil/jekyll-docker) -[![Deploy](https://github.com/JV-conseil/jekyll-docker/actions/workflows/deploy.yml/badge.svg)](https://github.com/JV-conseil/jekyll-docker/actions/workflows/deploy.yml) -![visitors](https://visitor-badge.laobi.icu/badge?page_id=JV-conseil.jekyll-docker) -[![License EUPL 1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](LICENSE) -[![Become a sponsor to JV-conseil](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/JV-conseil "Become a sponsor to JV-conseil") -[![Follow JV conseil on StackOverflow](https://img.shields.io/stackexchange/stackoverflow/r/2477854)](https://stackoverflow.com/users/2477854/jv-conseil "Follow JV conseil on StackOverflow") -[![Follow JVconseil on Twitter](https://img.shields.io/twitter/follow/JVconseil.svg?style=social&logo=twitter)](https://twitter.com/JVconseil "Follow JVconseil on Twitter") -[![Follow JVconseil on Mastodon](https://img.shields.io/mastodon/follow/110950122046692405)](https://mastodon.social/@JVconseil "Follow JVconseil@mastodon.social on Mastodon") -[![Follow JV conseil on GitHub](https://img.shields.io/github/followers/JV-conseil?label=JV-conseil&style=social)](https://github.com/JV-conseil "Follow JV-conseil on GitHub") - -Jekyll Docker is a software image that has Jekyll and many of its dependencies ready to use for you in an encapsulated format. It includes a default set of gems, different image types with different extra packages, and wrappers to make Jekyll run more smoothly from start to finish for most Jekyll users. If you would like to know more about Docker you can visit , and if you would like to know more about Jekyll, you can visit +Jekyll Docker is a software image that has Jekyll and many of its dependencies ready to use for you in an encapsulated format. It includes a default set of gems, different image types with different extra packages, and wrappers to make Jekyll run more smoothly from start to finish for most Jekyll users. If you would like to know more about Docker you can visit https://docker.com, and if you would like to know more about Jekyll, you can visit https://github.com/jekyll/jekyll ## Image Types -* `jvconseil/jekyll`: Default image. -* `jvconseil/jekyll-minimal`: Very minimal image. -* `jvconseil/jekyll-docker`: Includes tools. +* `jekyll/jekyll`: Default image. +* `jekyll/minimal`: Very minimal image. +* `jekyll/builder`: Includes tools. ### Standard -The standard images (`jvconseil/jekyll`) include a default set of "dev" packages, along with Node.js, and other stuff that makes Jekyll easy. It also includes a bunch of default gems that the community wishes us to maintain on the image. +The standard images (`jekyll/jekyll`) include a default set of "dev" packages, along with Node.js, and other stuff that makes Jekyll easy. It also includes a bunch of default gems that the community wishes us to maintain on the image. #### Usage ```sh -export JEKYLL_VERSION=4.3.2 +export JEKYLL_VERSION=3.8 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ - -it jvconseil/jekyll:$JEKYLL_VERSION \ + -it jekyll/jekyll:$JEKYLL_VERSION \ jekyll build ``` - #### Quick start under Windows (cmd) - ```cmd set site_name=my-blog -docker run --rm --volume="%CD%:/srv/jekyll" -it jvconseil/jekyll sh -c "chown -R jekyll /usr/gem/ && jekyll new %site_name%" && cd %site_name% +docker run --rm --volume="%CD%:/srv/jekyll" -it jekyll/jekyll sh -c "chown -R jekyll /usr/gem/ && jekyll new %site_name%" && cd %site_name% ``` - #### Quick start under Linux / Git Bash - If you are under linux skip `export MSYS_NO_PATHCONV=1`. It is added for compatibility. You can check [here](https://github.com/docker-archive/toolbox/issues/673). - ```sh export site_name="my-blog" && export MSYS_NO_PATHCONV=1 docker run --rm \ --volume="$PWD:/srv/jekyll" \ - -it jvconseil/jekyll \ + -it jekyll/jekyll \ sh -c "chown -R jekyll /usr/gem/ && jekyll new $site_name" \ && cd $site_name ``` - ### Builder The builder image comes with extra stuff that is not included in the standard image, like `lftp`, `openssh` and other extra packages meant to be used by people who are deploying their Jekyll builds to another server with a CI. @@ -67,10 +45,10 @@ The builder image comes with extra stuff that is not included in the standard im #### Usage ```sh -export JEKYLL_VERSION=4.3.2 +export JEKYLL_VERSION=3.8 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ - -it jvconseil/jekyll-docker:$JEKYLL_VERSION \ + -it jekyll/builder:$JEKYLL_VERSION \ jekyll build ``` @@ -83,10 +61,10 @@ The minimal image skips all the extra gems, all the extra dev dependencies and l ***You will need to provide a `.apk` file if you intend to use anything like Nokogiri or otherwise, we do not install any development headers or dependencies so C based gems will fail to install.*** ```sh -export JEKYLL_VERSION=4.3.2 +export JEKYLL_VERSION=3.8 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ - -it jvconseil/jekyll-minimal:$JEKYLL_VERSION \ + -it jekyll/minimal:$JEKYLL_VERSION \ jekyll build ``` @@ -95,12 +73,12 @@ docker run --rm \ If you are using a rootless container management system, you can set the `JEKYLL_ROOTLESS` environment variable to any non-zero value. For example, you can use the following to initialize a new jekyll project in the current directory using [`podman`](https://podman.io/). ```sh -podman run -ti --rm -v .:/srv/jekyll -e JEKYLL_ROOTLESS=1 docker.io/jvconseil/jekyll jekyll new . +podman run -ti --rm -v .:/srv/jekyll -e JEKYLL_ROOTLESS=1 docker.io/jekyll/jekyll jekyll new . ``` ## Server -For local development, Jekyll can be run in server mode inside the container. It will watch for changes, rebuild the site, and provide access through its included web server. You can then check the results of changes by reloading in a browser. +For local development, Jekyll can be run in server mode inside the container. It will watch for changes, rebuild the site, and provide access through its included web server. You can then check the results of changes by reloading http://localhost:4000/ in a browser. #### Usage @@ -108,23 +86,22 @@ For local development, Jekyll can be run in server mode inside the container. It docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ --publish [::1]:4000:4000 \ - jvconseil/jekyll \ + jekyll/jekyll \ jekyll serve ``` - ## Dependencies -Jekyll Docker will attempt to install any dependencies that you list inside of your `Gemfile`, matching the versions you have in your `Gemfile.lock`, including Jekyll if you have a version that does not match the version of the image you are using (you should be doing `gem "jekyll", "~> 4.3.2"` so that minor versions are installed if you use say image tag "3.7.3"). +Jekyll Docker will attempt to install any dependencies that you list inside of your `Gemfile`, matching the versions you have in your `Gemfile.lock`, including Jekyll if you have a version that does not match the version of the image you are using (you should be doing `gem "jekyll", "~> 3.8"` so that minor versions are installed if you use say image tag "3.7.3"). ### Updating If you provide a `Gemfile` and would like to update your `Gemfile.lock` you can run ```sh -export JEKYLL_VERSION=4.3.2 +export JEKYLL_VERSION=3.8 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ - -it jvconseil/jekyll:$JEKYLL_VERSION \ + -it jekyll/jekyll:$JEKYLL_VERSION \ bundle update ``` @@ -139,40 +116,38 @@ You can enable caching in Jekyll Docker by using a `docker --volume` that points ### Usage ```sh -export JEKYLL_VERSION=4.3.2 +export JEKYLL_VERSION=3.8 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ --volume="$PWD/vendor/bundle:/usr/local/bundle:Z" \ - -it jvconseil/jekyll:$JEKYLL_VERSION \ + -it jekyll/jekyll:$JEKYLL_VERSION \ jekyll build ``` - ***The root of the cache volume (in this case vendor) must also be excluded from the Jekyll build via the `_config.yml` exclude array setting.*** ## Configuration You can configure some pieces of Jekyll using environment variables, what you cannot with environment variables you can configure using the Jekyll CLI. Even with a wrapper, we pass all arguments onto Jekyll when we finally call it. -| ENV Var | Default | -| --------------- | ------- | -| `JEKYLL_UID` | `1000` | -| `JEKYLL_GID` | `1000` | -| `JEKYLL_DEBUG`, | `""` | -| `VERBOSE` | `""` | -| `FORCE_POLLING` | `""` | +| ENV Var | Default | +|---|---| +| `JEKYLL_UID` | `1000` | +| `JEKYLL_GID` | `1000` | +| `JEKYLL_DEBUG`, | `""` | +| `VERBOSE` | `""` | +| `FORCE_POLLING` | `""` | If you would like to know the CLI options for Jekyll, you can visit [Jekyll's Help Site][2] ## Packages -You can install system packages by providing a file named `.apk` with one package per line. If you need to find out what the package names are for a given command you wish to use you can visit . ***We provide many dependencies for most Ruby stuff by default for `builder` and standard images. This includes `ruby-dev`, `xml`, `xslt`, `git` and other stuff that most Ruby packages might need.*** - -## Sponsorship +You can install system packages by providing a file named `.apk` with one package per line. If you need to find out what the package names are for a given command you wish to use you can visit https://pkgs.alpinelinux.org. ***We provide many dependencies for most Ruby stuff by default for `builder` and standard images. This includes `ruby-dev`, `xml`, `xslt`, `git` and other stuff that most Ruby packages might need.*** -If this project helps you, you can offer me a cup of coffee ☕️ :-) +## Building -[![Become a sponsor to JV-conseil](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/JV-conseil) - - +```sh +script/build +``` +[1]: https://travis-ci.org/jekyll/docker [2]: http://jekyllrb.com/docs/configuration/#build-command-options diff --git a/opts.yml b/opts.yml index cd7d459..5d367b5 100644 --- a/opts.yml +++ b/opts.yml @@ -1,5 +1,5 @@ base_image: ruby:3.2.2-alpine3.18 -user: jvconseil +user: jekyll aliases: latest: 4.3.2 stable: 4.3.2 diff --git a/repos/builder/Dockerfile b/repos/builder/Dockerfile new file mode 120000 index 0000000..0f40514 --- /dev/null +++ b/repos/builder/Dockerfile @@ -0,0 +1 @@ +../jekyll/Dockerfile \ No newline at end of file diff --git a/repos/builder/copy b/repos/builder/copy new file mode 120000 index 0000000..f9b3c8f --- /dev/null +++ b/repos/builder/copy @@ -0,0 +1 @@ +../jekyll/copy \ No newline at end of file diff --git a/repos/jekyll-docker/opts.yml b/repos/builder/opts.yml similarity index 67% rename from repos/jekyll-docker/opts.yml rename to repos/builder/opts.yml index e21ea56..072bc63 100644 --- a/repos/jekyll-docker/opts.yml +++ b/repos/builder/opts.yml @@ -9,30 +9,21 @@ env: JEKYLL_ENV: production gems: all: &gems + - s3_website - html-proofer - - jekyll-avatar + - jekyll-sitemap + - jekyll-mentions - jekyll-coffeescript + - jekyll-sass-converter + - jekyll-redirect-from + - jekyll-paginate - jekyll-compose - - jekyll-default-layout - - jekyll-docs - jekyll-feed - - jekyll-include-cache - - jekyll-last-modified-at - - jekyll-mentions - - jekyll-optional-front-matter - - jekyll-paginate - - jekyll-readme-index - - jekyll-redirect-from - - jekyll-relative-links - - jekyll-sass-converter - - jekyll-seo-tag - - jekyll-sitemap - - jekyll-titles-from-headings - - jemoji + - jekyll-docs + - RedCloth - kramdown + - jemoji - minima - - RedCloth - - s3_website group: pages: - *gems diff --git a/repos/jekyll-docker/Dockerfile b/repos/jekyll-docker/Dockerfile deleted file mode 100644 index 3ce93f9..0000000 --- a/repos/jekyll-docker/Dockerfile +++ /dev/null @@ -1,196 +0,0 @@ -FROM <%= @meta.base_image %> -LABEL maintainer "JV conseil " -COPY copy / - -# -# EnvVars -# Ruby -# - -ENV BUNDLE_HOME=/usr/local/bundle -ENV BUNDLE_APP_CONFIG=/usr/local/bundle -ENV BUNDLE_DISABLE_PLATFORM_WARNINGS=truex -ENV BUNDLE_BIN=/usr/local/bundle/bin -ENV GEM_BIN=/usr/gem/bin -ENV GEM_HOME=/usr/gem -ENV RUBYOPT=-W0 - -# -# EnvVars -# Image -# - -ENV JEKYLL_VAR_DIR=/var/jekyll -ENV JEKYLL_DOCKER_TAG=<%= @meta.tag %> -ENV JEKYLL_VERSION=<%= @meta.release?? @meta.release : @meta.tag %> -ENV JEKYLL_DOCKER_COMMIT=<%= `git rev-parse --verify HEAD`.strip %> -ENV JEKYLL_DOCKER_NAME=<%= @meta.name %> -ENV JEKYLL_DATA_DIR=/srv/jekyll -ENV JEKYLL_BIN=/usr/jekyll/bin -ENV JEKYLL_ENV=development - -# -# EnvVars -# System -# - -ENV LANG=en_US.UTF-8 -ENV LANGUAGE=en_US:en -ENV TZ=America/Chicago -ENV PATH="$JEKYLL_BIN:$PATH" -ENV LC_ALL=en_US.UTF-8 -ENV LANG=en_US.UTF-8 -ENV LANGUAGE=en_US - -# -# EnvVars -# User -# - -<% if @meta.env? %> - ENV <%= @meta.env %> -<% end %> - -# -# EnvVars -# Main -# - -env VERBOSE=false -env FORCE_POLLING=false -env DRAFTS=false - -# -# Packages -# User -# - -<% if @meta.packages? %> - RUN apk --no-cache add <%= @meta.packages %> -<% end %> - -# -# Packages -# Dev -# - -RUN apk --no-cache add \ - zlib-dev \ - libffi-dev \ - build-base \ - libxml2-dev \ - imagemagick-dev \ - readline-dev \ - libxslt-dev \ - libffi-dev \ - yaml-dev \ - zlib-dev \ - vips-dev \ - vips-tools \ - sqlite-dev \ - cmake - -# -# Packages -# Main -# - -RUN apk --no-cache add \ - linux-headers \ - openjdk8-jre \ - less \ - zlib \ - libxml2 \ - readline \ - libxslt \ - libffi \ - git \ - nodejs \ - tzdata \ - shadow \ - bash \ - su-exec \ - npm \ - libressl \ - yarn - -# -# Gems -# Update -# - -RUN echo "gem: --no-ri --no-rdoc" > ~/.gemrc -RUN unset GEM_HOME && unset GEM_BIN && \ - yes | gem update --system - -# -# Gems -# Main -# - -RUN unset GEM_HOME && unset GEM_BIN && yes | gem install --force bundler -RUN gem install jekyll -v<%= @meta.release?? \ - @meta.release : @meta.tag %> -- \ - --use-system-libraries - -# -# Gems -# User -# - -<% if @meta.gems? %> - # Stops slow Nokogiri! - RUN gem install <%=@meta.gems %> -- \ - --use-system-libraries -<% end %> - -RUN addgroup -Sg 1000 jekyll -RUN adduser -Su 1000 -G \ - jekyll jekyll - -# -# Remove development packages on minimal. -# And on pages. Gems are unsupported. -# - -<% if @meta.name == "minimal" || @meta.name == "pages" || @meta.tag == "pages" %> - RUN apk --no-cache del \ - linux-headers \ - openjdk8-jre \ - zlib-dev \ - build-base \ - libxml2-dev \ - libxslt-dev \ - readline-dev \ - imagemagick-dev\ - libffi-dev \ - ruby-dev \ - yaml-dev \ - zlib-dev \ - libffi-dev \ - vips-dev \ - vips-tools \ - cmake -<% end %> - -RUN mkdir -p $JEKYLL_VAR_DIR -RUN mkdir -p $JEKYLL_DATA_DIR -RUN chown -R jekyll:jekyll $JEKYLL_DATA_DIR -RUN chown -R jekyll:jekyll $JEKYLL_VAR_DIR -RUN chown -R jekyll:jekyll $BUNDLE_HOME -RUN rm -rf /home/jekyll/.gem -RUN rm -rf $BUNDLE_HOME/cache -RUN rm -rf $GEM_HOME/cache -RUN rm -rf /root/.gem - -# Work around rubygems/rubygems#3572 -RUN mkdir -p /usr/gem/cache/bundle -RUN chown -R jekyll:jekyll \ - /usr/gem/cache/bundle - -CMD ["jekyll", "--help"] -ENTRYPOINT ["/usr/jekyll/bin/entrypoint"] -WORKDIR /srv/jekyll -VOLUME /srv/jekyll -EXPOSE 35729 -EXPOSE 4000 diff --git a/repos/jekyll-minimal/Dockerfile b/repos/jekyll-minimal/Dockerfile deleted file mode 100644 index dfd29ba96bf0b7543b988bcd738d8bab664c3598..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1024 zcmaKqL1+_E5Qb-)RMMi5rfNMXE>h5gYmzpmT@f)!S4%PA!R974Nw;*HHCr}`D0ry1 z9=v$ZQEwhR>P3RIpyHtikDf~JDpb6P@t>D@iSgjT?0hrx=Dm6Iwh{z2g4{2M%FcsX z-$ytajq{h~&AZ6Yi^bhs&m(#{f-IZ}uLF$27zWXD!wnnYg!mgR-*f9L4?NfNeRnOW zH;Il&?xxpVY*mQH#a}8})u7(MN}^-B-mN|IeQPzS*4z*=eNO0Z27HdLT~G_wJl`cU zxfX|T^UPPFx1jf+55;c7#-LI3f8s6xqW#vPx_sY%=5jZKd}HF;kY67EfN2c!uVWvF z{I~!37qY#)i5l*62lg}c0D1_GVvfh5)6fi*`{Ehrc4BAFZxNk>Yv2T=l$=$k5oyao z1A{_|dLLe=@5Zxd(YYV8zcEI{)4P&PCZ~|+w_GZj#d0-|Kg7Hp24*pBrnCE7?fzb5 zI#2hcUiG(o>BV={PD{Ogc`lpEIB6@FpUqjBf-`5?^EYfOYZnUnnHk5iXKj6#CtL&l zIyr1P#=RtAQ_Q&QYTc^<`}b%5pYSYyce`EQi{&Jg|LnH%@K1pkBpC-k7QPPlh3|l$ z3orl0C2(8fBPP+hyu~Q^lf>iTFTxYx)3PQ3{w48A@KK4I;6>pSSnqFih+gS^z(^@c cbci|V2U9?7)c^nh diff --git a/repos/jekyll-minimal/copy b/repos/jekyll-minimal/copy deleted file mode 100644 index 7d791c2c49231bb86bd2d463fce0594c531a6cb5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1016 zcmZva&ubG=5XWcRRANy`(`r2^K12|qYm&C6T`AHetV%K9!N!Y4^Wz29tl6?j#NO)7 zgBPL49u@o(dJxH>Jt!V}@aW02phCrq7{9Zfmo(zQ?0jbC&AfSUUnK|{1bJKzBfAJ@ z?T&IZmf$bT{d@Flrnr|o^oU-KAPZ-d*8#?0EQ@HhrNb6DDgL95@9E})C!Y3vU)O_X zo9LM2ZhGxooeI&o_$wv58Z=v2Np#ZG>&Axf+qIzD&>>=GpHQy{ybsU7`&NVX4aJP+ zJT&tX^fvS%^r_hAuyJS%bDvrRK#boxhz{NNUuvFWkZ(;~AM(rN?{N!*{7(GCkpJ!< z|8n*)uTaBtzJ>h={S5sI{S7^Vvz&#_KzS}cU~V^l?$RdF8Mqd9h&BPA7cdqfvT#A> zzo13`EPUrICiheNTgQp&p0BT^QmJX=`7T#Vs#vb(@iNq%Fi^#e%4EN6ZufhUa$oEp zop0~T>mR7SDD}?Og=~7>&Dgp8T+W^^xC^$kc*C)?PN9&WopoJj&M{|s#x>Aylf#x{ zJWC2T&5X0wnqCDMt!Mi`32T1c+|Ly1|MYr2?!|H%$}f5=^6-|xOOi~0+rrD>n($rl zw(#l^E`hfsKBDl(WYaP5uEZ1IPr?)6DOr;QA4q%>9Fw>LFAJx^roYuCdSm*4k%}bQ cCEAg=wLe&&0P}xlnf^}1Z=U4>*q8o)0V;B9iU0rr diff --git a/repos/jekyll/Dockerfile b/repos/jekyll/Dockerfile index 1de94336a2211966bb655dac1e03dcfec93f96e9..dc4afabc1f8a37a1061f5ccaad0890a2577bb1e4 100644 GIT binary patch literal 3219 zcmb7HTX)(<5Ps)ZOtF)v3b|=}n)*a>1jv{e5J!Mr_i~6VEg&Ol)s;j{PELP&XD<@V z#p&sTZSBnN>^HY>$Jd@agmhpoZ$0`snMaAgB=G8eV_>(P0VIBu7WhLLG(S=n z(iGYx{7m8)-aU!+2a;~KOG4IpE28h4jgC8hfPiLOFdL1t#u+&2=FVq1etG5N7DWwb zbO-I(s5@}xH}24}%ra+YOanhQAImh1iN3=gkLMkCblvZLdtbLdvD;{IJg}$Nt~Z?D z+uo=@>P@VIm3tQ3{n4>0^D#=rwLNDzuXij-vZvU=MUB|*&Dsy{cxoB<7l-clc_=G? zKRUM$gTegH_U7HbXPFzHnNMWBjbmX(sk?6H*74?3yJzk4Qus@r5FWM4isMcC?nv9i zNK7z&S63>RY7LiaeQZNr)p3Wz{#01{w2TU1WMgEQE&_(JAuL*K;l{DMpIUjrqU->N zvN5tTi95WhpNI<50C(-FE&a~f=7isMz-374m@9wLk`5%^ITny*e=hx zs3|RV=JsH4@`97X-K~ePXE|XU^t)FOEmWScnXY({0eJLwF-18S<5rS}{0k52tu@3R z<+k{~JI8Cg6USQkaZZE;`=NuK;SL7a5SqN}+1JyF5(tZ9KUibc@@_o^FH>rT(VLCH z&(>HfDK!E=SP}5UP=j6VKY?AlsY^B-`wQ0o#9(}hqelZP0QdsG7mKJ~K9*4&8l1c; z?Q;^psnvqeuoI(TUCS8p!x%}e7NE)JJTCOLe#O>L;##+dWfNt2tr3fY(l{4L^1tJ# z*xeB%{+h_VX}(v9`-by~w0t&Jh?y{HnPwz?3fFIqC#IYxxzuoQdKkoaBNS>sv;!EfkzL4fCKct_YWu-x$Ngz*UiTI1RGlUY0#nxx3^tVS6 zQBfHh6pYBdCBce96M6Jf)(?x+-;f4Pcn|-WEmX2V)J2)*qyWy%oPy!?YuHJ!LAijV z-;x}@0v>}>+=Ui%Ne-gA6%IY-J2NjD-WiS3yzueqGmHgg0Rj11F@ca@TInT=fw9>& z@Q$E4PWj-TCTX-Td;$C@bD|tDcxZhVVQcEHoN7`;lB)(igGoWN9P${mH==90j9By? z0^kYI5hGBEi66#p{Z9}Y6N%Cd!zH6-2F7FwKU`c~fO_1N5*=aa(4>?~qbFQcaZ+1_ zUmi*5hJeQQP?HD_A4!yAL&q)TCmV?nB^jry7C?^!_pu)^qh*#+R*(?4?bEAxnk);N z%1#r$epSh+Rl=aA;7=z%qU3^{g;)E;7ZO?ZoSzQ+72v324>%35miA~&(A*x8Nr}!< zfUordkpUd=9j~?{%EW^>iq*V@eWMfH5i~44oecr@SWhi?yaynu?w~}Hbr>-)GN>L_ zH4BOEIZ{>=gU}*Vd``jeR8d{3x~UBPpS}8}FPYV5Q*k{@z+ek7S2Q7NcoE#BE6=q< zrg#eXv=wt5t4u~|Ah6Tnxu_sS42$Gt)&?7U~&_iq_4PU&B`Vb1rPOB z#EbVF_0~g=o+O7Bw0J1u(UW*rq29#!&t_g?JUB2r-^{#uZ{EDE20@)54=Q0~7s0IW z#yJ`@`OEV0dC9bkd%3jc|`)%J-jk}LL<@vta2pTP- zBa*w}wN~0yqDk>r%XTejG_jKCxUN_AC%$j52erBi5!2^{>S4g==-Q=d!G`B6B8zKr z2sh7s6?zl827N4c3pNgoq5qS201)lB52MQu{FjQm8RnZ)*GBxx8j&t2G0(67)#Xbf{a0iA_rpxhVFIJX-=dtsC4G+YBGAQj2E=rkg2IcQ)| zD2d*O*Xg_Q>{)c~r|fSWCF1E_NhXss$n#sSmaSr?md77r-3kM%n6}c{FPojgUSzp1 z4x~QnZ|~CUAE=#`dgt;&HkEPHb}m1kvoi&E!FCpx9Xsn33i-J?*LCI{eV1ok1N}BV zYB|QeBwHAu6qNt$PUPXA0xwC@1V0tN4)%p_gI@`k z{^ByYBk?hd=$^dA1o(r*P4H*oDexItlK}sc_%!&K#4YfOa0;yVH@ZYSdLJ-SktDiA aU5Oh9!}TVZ-Jt!V}@aW02V1@Q3#_w$BC5<>RJD-_(GjHD8R}O+YLDoxQWEa4! zonel~O#ZUGIDTkah5hV_NAz|GSvbSI4ln{^7(}a0H*A6v;y-Qsp4)ix%yT{8cWXhT zMRZ1T_q^8qcA02Y{N=-jdNH_j5(Jm0;YOeUw0=et}kszRxf!^=<)!ax<$DxLYhwbScG%6WZo zdcOVXcfU}3P3rAi^O@9~leV(C*{n5}cjhg7;jV3E?0h~qGvhe+tgX-Tl53zp#|JIP zc$Oq=iWz6EHoP)0TF>@>5?1}1zMl!y|LJzS+>7M`lwb6A Date: Mon, 28 Aug 2023 15:14:32 +0200 Subject: [PATCH 28/29] ruby/setup-ruby@v1 & docker/login-action@v2 --- .github/workflows/deploy.yml | 23 ++++++++++++++--------- .travis.yml | 6 +++--- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1a26809..fac2b22 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,19 +15,19 @@ jobs: matrix: env: - - - jekyll:4.2.2 + - jekyll:4.3.2 - jekyll:stable - jekyll:latest - jekyll:4.0 - jekyll:4 - - - builder:4.2.2 + - builder:4.3.2 - builder:stable - builder:latest - builder:4.0 - builder:4 - - - minimal:4.2.2 + - minimal:4.3.2 - minimal:stable - minimal:latest - minimal:4.0 @@ -37,20 +37,25 @@ jobs: - jekyll:pages steps: - uses: actions/checkout@v3 - - uses: actions/setup-ruby@v1 + + - uses: ruby/setup-ruby@v1 with: - ruby-version: '2.x' + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - run: bundle install + - run: | echo $'{\n "experimental": true\n}' | \ sudo tee /etc/docker/daemon.json sudo systemctl restart docker name: 'docker experimental' + - name: 'docker login' - run: | - echo "${{secrets.DOCKER_PASSWORD}}" | docker login \ - --username ${{secrets.DOCKER_USERNAME}} \ - --password-stdin + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - run: | docker-template build $DOCKER_REPO --no-push --force --squash docker-template push $DOCKER_REPO diff --git a/.travis.yml b/.travis.yml index aa60836..0fd707b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,7 @@ jobs: # -- env: "\ DOCKER_REPO='\ - jekyll:4.2.2 \ + jekyll:4.3.2 \ jekyll:stable \ jekyll:latest \ jekyll:pages \ @@ -43,7 +43,7 @@ jobs: # -- - env: "\ DOCKER_REPO='\ - builder:4.2.2 \ + builder:4.3.2 \ builder:stable \ builder:latest \ jekyll:builder \ @@ -57,7 +57,7 @@ jobs: # -- - env: "\ DOCKER_REPO='\ - minimal:4.2.2 \ + minimal:4.3.2 \ minimal:stable \ minimal:latest \ jekyll:minimal \ From ea94160e2058124ec7d04b79a61dfbd636461b85 Mon Sep 17 00:00:00 2001 From: JV-conseil Date: Tue, 29 Aug 2023 17:22:52 +0200 Subject: [PATCH 29/29] bundle exec docker-template build $DOCKER_REPO --no-push --force --squash --- .github/workflows/build.yml | 12 ++++++++---- .github/workflows/deploy.yml | 11 +++++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a542af..f937425 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,16 +15,20 @@ jobs: - jekyll:pages steps: - uses: actions/checkout@v3 - - uses: actions/setup-ruby@v1 + + - uses: ruby/setup-ruby@v1 with: - ruby-version: '2.x' + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - run: bundle install + - run: | echo $'{\n "experimental": true\n}' | \ sudo tee /etc/docker/daemon.json sudo systemctl restart docker name: 'docker experimental' - - run: docker-template build $DOCKER_REPO --no-push --force --squash + + - run: bundle exec docker-template build $DOCKER_REPO --no-push --force --squash env: RUBYOPT: "-W0" - DOCKER_REPO: "${{join(matrix.env, ' ')}}" + DOCKER_REPO: "${{ join(matrix.env, ' ') }}" diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fac2b22..e7406e3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -56,9 +56,12 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - run: | - docker-template build $DOCKER_REPO --no-push --force --squash - docker-template push $DOCKER_REPO + - run: bundle exec docker-template build $DOCKER_REPO --no-push --force --squash + env: + RUBYOPT: "-W0" + DOCKER_REPO: "${{ join(matrix.env, ' ') }}" + + - run: bundle exec docker-template push $DOCKER_REPO env: RUBYOPT: "-W0" - DOCKER_REPO: "${{join(matrix.env, ' ')}}" + DOCKER_REPO: "${{ join(matrix.env, ' ') }}"