diff --git a/.bash/docker.sh b/.bash/docker.sh new file mode 100755 index 00000000..a1130ab3 --- /dev/null +++ b/.bash/docker.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +# +# Script Name : docker.sh +# Description : ... +# Created : January 30, 2025 +# Author : JV-conseil +# Contact : contact@jv-conseil.dev +# Website : https://www.jv-conseil.dev +# Copyright : (c) 2025 JV-conseil +# All rights reserved +# ======================================================== + +set -Eeou pipefail +shopt -s failglob + +_jvcl_::dockerfile_reverse_engineer() { + local _image="${1:-jvconseil/jekyll-docker:latest}" _dump="./DockerfileReverseEngineer.txt" + docker history --no-trunc --format='table {{.CreatedBy}}' "${_image}" | + tail -r | + sed -E 's~/bin/sh -c #\(nop\) +~~g; s~/bin/sh -c~RUN~g;' \ + >"${_dump}" +} + +_jvcl_::update_dockerfile() { + local _comit _jekyll=4.4.1 + + _comit=$(git rev-parse --verify HEAD) + + sed -i '' -E "s~^ENV JEKYLL_DOCKER_COMMIT=[a-z0-9]+$~ENV JEKYLL_DOCKER_COMMIT=${_comit}~g" ./Dockerfile && + printf "ENV JEKYLL_DOCKER_COMMIT=%s\n" "${_comit}" + + sed -i '' -E "s~^ENV JEKYLL_VERSION=[0-9.]+$~ENV JEKYLL_VERSION=${_jekyll}~g" ./Dockerfile && + printf "ENV JEKYLL_VERSION=%s\n" "${_jekyll}" +} + +_jvcl_::dockerfile_reverse_engineer "$@" + diff --git a/.dockerignore b/.dockerignore index dc12af66..40ad699e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -57,4 +57,9 @@ yarn.lock # # Git # -/.git \ No newline at end of file +/.git +_deprecated +/*.txt +/.bash +/.github +/.vscode diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index eb65b138..00000000 --- a/.editorconfig +++ /dev/null @@ -1,9 +0,0 @@ -root = true - -[*] -charset = utf-8 -indent_style = space -trim_trailing_whitespace = true -insert_final_newline = true -end_of_line = lf -indent_size = 2 diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 1c60d672..00000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: envygeeks diff --git a/.github/codeowners b/.github/codeowners index 5a22f834..c0dc46fc 100644 --- a/.github/codeowners +++ b/.github/codeowners @@ -1 +1 @@ -* @envygeeks +* @JV-conseil diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 5ace4600..00000000 --- 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/security b/.github/security deleted file mode 100644 index 5a22f834..00000000 --- a/.github/security +++ /dev/null @@ -1 +0,0 @@ -* @envygeeks diff --git a/.github/workflows-disabled/build.yml b/.github/workflows-disabled/build.yml new file mode 100644 index 00000000..97c200e0 --- /dev/null +++ b/.github/workflows-disabled/build.yml @@ -0,0 +1,42 @@ +# 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-disabled/deploy copy.yml b/.github/workflows-disabled/deploy copy.yml new file mode 100644 index 00000000..57ef9964 --- /dev/null +++ b/.github/workflows-disabled/deploy copy.yml @@ -0,0 +1,63 @@ +# Deploy to Docker Hub +# See +# Copyright (c) 2019-2023 JV-conseil, All rights reserved +name: "Deploy" + +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: + runs-on: ubuntu-latest + timeout-minutes: 360 + + name: "Deploy" + + strategy: + fail-fast: false + matrix: + env: + - - jekyll-docker:4.4.1 + - jekyll-docker:stable + - jekyll-docker:latest + - jekyll-docker:4.0 + - jekyll-docker:4 + + 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 + + - name: "Login to Docker Hub" + # uses: docker/login-action@v2 + uses: docker/login-action@v3 + 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 + env: + RUBYOPT: "-W0" + DOCKER_REPO: "${{ join(matrix.env, ' ') }}" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 0a542af8..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,30 +0,0 @@ -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 1a26809d..40f26c99 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,59 +1,51 @@ -name: 'Push' +# Deploy to Docker Hub +# See +# Copyright (c) 2019-2023 JV-conseil, All rights reserved +name: "Publish Docker image" + on: push: branches: - - $default-branch + - main schedule: - - cron: 2 4 10 * * + # “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: runs-on: ubuntu-latest timeout-minutes: 360 - name: 'Build' - 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 + + name: "Deploy" + steps: - - uses: actions/checkout@v3 - - uses: actions/setup-ruby@v1 + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 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' - - 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, ' ')}}" + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: "Setup Ruby" + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@v6 + with: + context: . + # file: ./Dockerfile + push: true + tags: user/app:latest + labels: user/app:latest diff --git a/.gitignore b/.gitignore index 97b401c4..a11c0611 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,10 @@ yarn.lock # Editor # /.idea + +# +# Git +# +/.git +_deprecated +/*.txt diff --git a/.rubocop.yml b/.rubocop.yml deleted file mode 100644 index d65af1d7..00000000 --- a/.rubocop.yml +++ /dev/null @@ -1,7 +0,0 @@ -inherit_gem: - envygeeks-rubocop: - - rules.yml -Style/SingleLineMethods: { Enabled: false } -Layout/EmptyLineBetweenDefs: { Enabled: false } -Style/StringLiterals: - EnforcedStyle: double_quotes diff --git a/.ruby-version b/.ruby-version index 24ba9a38..8cf6caf5 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.0 +3.4.1 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index aa608365..00000000 --- a/.travis.yml +++ /dev/null @@ -1,68 +0,0 @@ ---- -services: docker -script: script/travis -sudo: required -language: ruby -os: linux -cache: - bundler: true - directories: - - vendor/bundle -branches: - only: - - master -env: - global: - - 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 - # -- - # jekyll/jekyll - # -- - env: "\ - DOCKER_REPO='\ - jekyll:4.2.2 \ - jekyll:stable \ - jekyll:latest \ - jekyll:pages \ - jekyll:4.0 \ - jekyll:4 \ - '\ - " - # -- - # 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='\ - 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 new file mode 100644 index 00000000..69943153 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "dotjoshjohnson.xml" + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..9b839338 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,19 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "type": "shell", + "presentation": { + "panel": "new", + "focus": true, + "revealProblems": "onProblem", + }, + "problemMatcher": [], + "tasks": [ + { + "label": "docker build & push", + "command": "docker build -t jvconseil/jekyll-docker:4.4.1 . && docker image ls && docker push jvconseil/jekyll-docker:4.4.1", + "detail": "docker build & push" + } + ] +} \ No newline at end of file diff --git a/COPYING b/COPYING deleted file mode 100644 index 8a54a5f7..00000000 --- a/COPYING +++ /dev/null @@ -1,13 +0,0 @@ -Copyright (c) 2015-2020 Jordon Bedwell - -Permission to use, copy, modify, and/or distribute this software for -any purpose with or without fee is hereby granted, provided that the -above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN -AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/repos/jekyll/Dockerfile b/Dockerfile similarity index 55% rename from repos/jekyll/Dockerfile rename to Dockerfile index dc4afabc..cdc97431 100644 --- a/repos/jekyll/Dockerfile +++ b/Dockerfile @@ -1,16 +1,27 @@ -FROM <%= @meta.base_image %> -LABEL maintainer "Jordon Bedwell " -COPY copy / +# +# Script Name : Dockerfile +# Description : ... +# Created : January 30, 2025 +# Author : JV-conseil +# Contact : contact@jv-conseil.dev +# Website : https://www.jv-conseil.dev +# Copyright : (c) 2025 JV-conseil +# All rights reserved +# ======================================================== + +FROM ruby:3-alpine +LABEL maintainer="JV conseil " +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 BUNDLE_DISABLE_PLATFORM_WARNINGS=true +ENV BUNDLE_HOME=/usr/local/bundle ENV GEM_BIN=/usr/gem/bin ENV GEM_HOME=/usr/gem ENV RUBYOPT=-W0 @@ -20,14 +31,14 @@ ENV RUBYOPT=-W0 # 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 +ENV JEKYLL_DATA_DIR=/srv/jekyll +ENV JEKYLL_DOCKER_COMMIT="$(/usr/bin/git rev-parse --verify HEAD)" +ENV JEKYLL_DOCKER_NAME=jekyll-docker +ENV JEKYLL_ENV=production +ENV JEKYLL_VAR_DIR=/var/jekyll +ENV JEKYLL_VERSION=4.4.1 +ENV JEKYLL_DOCKER_TAG=$JEKYLL_VERSION # # EnvVars @@ -36,38 +47,21 @@ ENV JEKYLL_ENV=development ENV LANG=en_US.UTF-8 ENV LANGUAGE=en_US:en -ENV TZ=America/Chicago +ENV TZ=Europe/Paris 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 +ENV VERBOSE=false +ENV FORCE_POLLING=false +ENV DRAFTS=false -# -# Packages -# User -# - -<% if @meta.packages? %> - RUN apk --no-cache add <%= @meta.packages %> -<% end %> # # Packages @@ -75,20 +69,19 @@ env DRAFTS=false # RUN apk --no-cache add \ - zlib-dev \ - libffi-dev \ build-base \ - libxml2-dev \ + cmake \ imagemagick-dev \ - readline-dev \ - libxslt-dev \ libffi-dev \ - yaml-dev \ - zlib-dev \ + libxml2-dev \ + libxslt-dev \ + readline-dev \ + ruby-dev \ + sqlite-dev \ vips-dev \ vips-tools \ - sqlite-dev \ - cmake + yaml-dev \ + zlib-dev # # Packages @@ -96,23 +89,26 @@ RUN apk --no-cache add \ # RUN apk --no-cache add \ - linux-headers \ - openjdk8-jre \ + bash \ + git \ less \ - zlib \ + lftp \ + libffi \ + libressl \ libxml2 \ - readline \ libxslt \ - libffi \ - git \ + linux-headers \ nodejs \ - tzdata \ + npm \ + openjdk8-jre \ + openssh-client \ + readline \ + rsync \ shadow \ - bash \ su-exec \ - npm \ - libressl \ - yarn + tzdata \ + yarn \ + zlib # # Gems @@ -129,20 +125,39 @@ RUN unset GEM_HOME && unset GEM_BIN && \ # 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 +RUN gem install --backtrace jekyll -v $JEKYLL_VERSION # # Gems -# User -# +# Extension +# + +RUN gem install --backtrace -V \ + html-proofer \ + jekyll-avatar \ + jekyll-coffeescript \ + 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 \ + kramdown \ + minima \ + RedCloth \ + s3_website -<% 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 \ @@ -153,25 +168,21 @@ RUN adduser -Su 1000 -G \ # 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 apk --no-cache del \ + build-base \ + cmake \ + imagemagick-dev\ + libffi-dev \ + libxml2-dev \ + libxslt-dev \ + linux-headers \ + openjdk8-jre \ + readline-dev \ + ruby-dev \ + vips-dev \ + vips-tools \ + yaml-dev \ + zlib-dev RUN mkdir -p $JEKYLL_VAR_DIR RUN mkdir -p $JEKYLL_DATA_DIR diff --git a/DockerfileReverseEngineer.txt b/DockerfileReverseEngineer.txt new file mode 100644 index 00000000..c462cfea --- /dev/null +++ b/DockerfileReverseEngineer.txt @@ -0,0 +1,71 @@ +ADD file:e3abcdba177145039cfef1ad882f9f81a612a24c9f044b19f713b95454d2e3f6 in / +CMD ["/bin/sh"] +RUN set -eux; apk add --no-cache bzip2 ca-certificates gmp-dev libffi-dev procps yaml-dev zlib-dev ; # buildkit +RUN set -eux; mkdir -p /usr/local/etc; { echo 'install: --no-document'; echo 'update: --no-document'; } >> /usr/local/etc/gemrc # buildkit +ENV LANG=C.UTF-8 +ENV RUBY_VERSION=3.3.2 +ENV RUBY_DOWNLOAD_URL=https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.2.tar.xz +ENV RUBY_DOWNLOAD_SHA256=b5e8a8ed4a47cdd9a3358b5bdd998c37bd9e971ca63766a37d5ae5933fdb69f1 +RUN set -eux; apk add --no-cache --virtual .ruby-builddeps autoconf bzip2 bzip2-dev ca-certificates coreutils dpkg-dev dpkg g++ gcc gdbm-dev glib-dev libc-dev libffi-dev libxml2-dev libxslt-dev linux-headers make ncurses-dev openssl openssl-dev patch procps ruby tar xz yaml-dev zlib-dev ; rustArch=; apkArch="$(apk --print-arch)"; case "$apkArch" in 'x86_64') rustArch='x86_64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/x86_64-unknown-linux-musl/rustup-init'; rustupSha256='7aa9e2a380a9958fc1fc426a3323209b2c86181c6816640979580f62ff7d48d4' ;; 'aarch64') rustArch='aarch64-unknown-linux-musl'; rustupUrl='https://static.rust-lang.org/rustup/archive/1.26.0/aarch64-unknown-linux-musl/rustup-init'; rustupSha256='b1962dfc18e1fd47d01341e6897cace67cddfabf547ef394e8883939bd6e002e' ;; esac; if [ -n "$rustArch" ]; then mkdir -p /tmp/rust; wget -O /tmp/rust/rustup-init "$rustupUrl"; echo "$rustupSha256 */tmp/rust/rustup-init" | sha256sum --check --strict; chmod +x /tmp/rust/rustup-init; export RUSTUP_HOME='/tmp/rust/rustup' CARGO_HOME='/tmp/rust/cargo'; export PATH="$CARGO_HOME/bin:$PATH"; /tmp/rust/rustup-init -y --no-modify-path --profile minimal --default-toolchain '1.74.1' --default-host "$rustArch"; rustc --version; cargo --version; fi; wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; mkdir -p /usr/src/ruby; tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; rm ruby.tar.xz; cd /usr/src/ruby; wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch'; echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum --check --strict; patch -p1 -i thread-stack-fix.patch; rm thread-stack-fix.patch; export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; { echo '#define ENABLE_PATH_CHECK 0'; echo; cat file.c; } > file.c.new; mv file.c.new file.c; autoconf; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; ./configure --build="$gnuArch" --disable-install-doc --enable-shared ${rustArch:+--enable-yjit} ; make -j "$(nproc)"; make install; rm -rf /tmp/rust; runDeps="$( scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | sort -u | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' )"; apk add --no-network --virtual .ruby-rundeps $runDeps; apk del --no-network .ruby-builddeps; cd /; rm -r /usr/src/ruby; if apk --no-network list --installed | grep -v '^[.]ruby-rundeps' | grep -i ruby ; then exit 1; fi; [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; ruby --version; gem --version; bundle --version # buildkit +ENV GEM_HOME=/usr/local/bundle +ENV BUNDLE_SILENCE_ROOT_WARNING=1 BUNDLE_APP_CONFIG=/usr/local/bundle +ENV PATH=/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +RUN mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" # buildkit +CMD ["irb"] +LABEL maintainer=JV conseil +COPY dir:8f3476f3c09fc6ada315ed9b0884b5cb492c001bab80bb3b36e2aaca593d5d04 in / +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 +ENV JEKYLL_VAR_DIR=/var/jekyll +ENV JEKYLL_DOCKER_TAG=4.3.3 +ENV JEKYLL_VERSION=4.3.3 +ENV JEKYLL_DOCKER_COMMIT=9ba5d71634b6a74cb5dc118f33eda2a8de2df982 +ENV JEKYLL_DOCKER_NAME=jekyll-docker +ENV JEKYLL_DATA_DIR=/srv/jekyll +ENV JEKYLL_BIN=/usr/jekyll/bin +ENV JEKYLL_ENV=development +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV TZ=America/Chicago +ENV PATH=/usr/jekyll/bin:/usr/local/bundle/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV LC_ALL=en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US +ENV JEKYLL_ENV=production +ENV VERBOSE=false +ENV FORCE_POLLING=false +ENV DRAFTS=false +apk --no-cache add rsync openssh-client lftp git +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 +apk --no-cache add linux-headers openjdk8-jre less zlib libxml2 readline libxslt libffi git nodejs tzdata shadow bash su-exec npm libressl yarn +echo "gem: --no-ri --no-rdoc" > ~/.gemrc +unset GEM_HOME && unset GEM_BIN && yes | gem update --system +unset GEM_HOME && unset GEM_BIN && yes | gem install --force bundler +gem install jekyll -v$JEKYLL_VERSION +gem install html-proofer jekyll-avatar jekyll-coffeescript 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 kramdown minima RedCloth s3_website +addgroup -Sg 1000 jekyll +adduser -Su 1000 -G jekyll jekyll +mkdir -p $JEKYLL_VAR_DIR +mkdir -p $JEKYLL_DATA_DIR +chown -R jekyll:jekyll $JEKYLL_DATA_DIR +chown -R jekyll:jekyll $JEKYLL_VAR_DIR +chown -R jekyll:jekyll $BUNDLE_HOME +rm -rf /home/jekyll/.gem +rm -rf $BUNDLE_HOME/cache +rm -rf $GEM_HOME/cache +rm -rf /root/.gem +mkdir -p /usr/gem/cache/bundle +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 + +CREATED BY diff --git a/Gemfile b/Gemfile deleted file mode 100644 index cd5a4c5f..00000000 --- a/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gem "docker-template" - -group :development do - gem 'envygeeks-rubocop' - unless ENV["CI"] == "true" - gem "travis" - gem "pry" - end -end diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..4153cd37 --- /dev/null +++ b/LICENSE @@ -0,0 +1,287 @@ + EUROPEAN UNION PUBLIC LICENCE v. 1.2 + EUPL © the European Union 2007, 2016 + +This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined +below) which is provided under the terms of this Licence. Any use of the Work, +other than as authorised under this Licence is prohibited (to the extent such +use is covered by a right of the copyright holder of the Work). + +The Work is provided under the terms of this Licence when the Licensor (as +defined below) has placed the following notice immediately following the +copyright notice for the Work: + + Licensed under the EUPL + +or has expressed by any other means his willingness to license under the EUPL. + +1. Definitions + +In this Licence, the following terms have the following meaning: + +- ‘The Licence’: this Licence. + +- ‘The Original Work’: the work or software distributed or communicated by the + Licensor under this Licence, available as Source Code and also as Executable + Code as the case may be. + +- ‘Derivative Works’: the works or software that could be created by the + Licensee, based upon the Original Work or modifications thereof. This Licence + does not define the extent of modification or dependence on the Original Work + required in order to classify a work as a Derivative Work; this extent is + determined by copyright law applicable in the country mentioned in Article 15. + +- ‘The Work’: the Original Work or its Derivative Works. + +- ‘The Source Code’: the human-readable form of the Work which is the most + convenient for people to study and modify. + +- ‘The Executable Code’: any code which has generally been compiled and which is + meant to be interpreted by a computer as a program. + +- ‘The Licensor’: the natural or legal person that distributes or communicates + the Work under the Licence. + +- ‘Contributor(s)’: any natural or legal person who modifies the Work under the + Licence, or otherwise contributes to the creation of a Derivative Work. + +- ‘The Licensee’ or ‘You’: any natural or legal person who makes any usage of + the Work under the terms of the Licence. + +- ‘Distribution’ or ‘Communication’: any act of selling, giving, lending, + renting, distributing, communicating, transmitting, or otherwise making + available, online or offline, copies of the Work or providing access to its + essential functionalities at the disposal of any other natural or legal + person. + +2. Scope of the rights granted by the Licence + +The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, +sublicensable licence to do the following, for the duration of copyright vested +in the Original Work: + +- use the Work in any circumstance and for all usage, +- reproduce the Work, +- modify the Work, and make Derivative Works based upon the Work, +- communicate to the public, including the right to make available or display + the Work or copies thereof to the public and perform publicly, as the case may + be, the Work, +- distribute the Work or copies thereof, +- lend and rent the Work or copies thereof, +- sublicense rights in the Work or copies thereof. + +Those rights can be exercised on any media, supports and formats, whether now +known or later invented, as far as the applicable law permits so. + +In the countries where moral rights apply, the Licensor waives his right to +exercise his moral right to the extent allowed by law in order to make effective +the licence of the economic rights here above listed. + +The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to +any patents held by the Licensor, to the extent necessary to make use of the +rights granted on the Work under this Licence. + +3. Communication of the Source Code + +The Licensor may provide the Work either in its Source Code form, or as +Executable Code. If the Work is provided as Executable Code, the Licensor +provides in addition a machine-readable copy of the Source Code of the Work +along with each copy of the Work that the Licensor distributes or indicates, in +a notice following the copyright notice attached to the Work, a repository where +the Source Code is easily and freely accessible for as long as the Licensor +continues to distribute or communicate the Work. + +4. Limitations on copyright + +Nothing in this Licence is intended to deprive the Licensee of the benefits from +any exception or limitation to the exclusive rights of the rights owners in the +Work, of the exhaustion of those rights or of other applicable limitations +thereto. + +5. Obligations of the Licensee + +The grant of the rights mentioned above is subject to some restrictions and +obligations imposed on the Licensee. Those obligations are the following: + +Attribution right: The Licensee shall keep intact all copyright, patent or +trademarks notices and all notices that refer to the Licence and to the +disclaimer of warranties. The Licensee must include a copy of such notices and a +copy of the Licence with every copy of the Work he/she distributes or +communicates. The Licensee must cause any Derivative Work to carry prominent +notices stating that the Work has been modified and the date of modification. + +Copyleft clause: If the Licensee distributes or communicates copies of the +Original Works or Derivative Works, this Distribution or Communication will be +done under the terms of this Licence or of a later version of this Licence +unless the Original Work is expressly distributed only under this version of the +Licence — for example by communicating ‘EUPL v. 1.2 only’. The Licensee +(becoming Licensor) cannot offer or impose any additional terms or conditions on +the Work or Derivative Work that alter or restrict the terms of the Licence. + +Compatibility clause: If the Licensee Distributes or Communicates Derivative +Works or copies thereof based upon both the Work and another work licensed under +a Compatible Licence, this Distribution or Communication can be done under the +terms of this Compatible Licence. For the sake of this clause, ‘Compatible +Licence’ refers to the licences listed in the appendix attached to this Licence. +Should the Licensee's obligations under the Compatible Licence conflict with +his/her obligations under this Licence, the obligations of the Compatible +Licence shall prevail. + +Provision of Source Code: When distributing or communicating copies of the Work, +the Licensee will provide a machine-readable copy of the Source Code or indicate +a repository where this Source will be easily and freely available for as long +as the Licensee continues to distribute or communicate the Work. + +Legal Protection: This Licence does not grant permission to use the trade names, +trademarks, service marks, or names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the copyright notice. + +6. Chain of Authorship + +The original Licensor warrants that the copyright in the Original Work granted +hereunder is owned by him/her or licensed to him/her and that he/she has the +power and authority to grant the Licence. + +Each Contributor warrants that the copyright in the modifications he/she brings +to the Work are owned by him/her or licensed to him/her and that he/she has the +power and authority to grant the Licence. + +Each time You accept the Licence, the original Licensor and subsequent +Contributors grant You a licence to their contributions to the Work, under the +terms of this Licence. + +7. Disclaimer of Warranty + +The Work is a work in progress, which is continuously improved by numerous +Contributors. It is not a finished work and may therefore contain defects or +‘bugs’ inherent to this type of development. + +For the above reason, the Work is provided under the Licence on an ‘as is’ basis +and without warranties of any kind concerning the Work, including without +limitation merchantability, fitness for a particular purpose, absence of defects +or errors, accuracy, non-infringement of intellectual property rights other than +copyright as stated in Article 6 of this Licence. + +This disclaimer of warranty is an essential part of the Licence and a condition +for the grant of any rights to the Work. + +8. Disclaimer of Liability + +Except in the cases of wilful misconduct or damages directly caused to natural +persons, the Licensor will in no event be liable for any direct or indirect, +material or moral, damages of any kind, arising out of the Licence or of the use +of the Work, including without limitation, damages for loss of goodwill, work +stoppage, computer failure or malfunction, loss of data or any commercial +damage, even if the Licensor has been advised of the possibility of such damage. +However, the Licensor will be liable under statutory product liability laws as +far such laws apply to the Work. + +9. Additional agreements + +While distributing the Work, You may choose to conclude an additional agreement, +defining obligations or services consistent with this Licence. However, if +accepting obligations, You may act only on your own behalf and on your sole +responsibility, not on behalf of the original Licensor or any other Contributor, +and only if You agree to indemnify, defend, and hold each Contributor harmless +for any liability incurred by, or claims asserted against such Contributor by +the fact You have accepted any warranty or additional liability. + +10. Acceptance of the Licence + +The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ +placed under the bottom of a window displaying the text of this Licence or by +affirming consent in any other similar way, in accordance with the rules of +applicable law. Clicking on that icon indicates your clear and irrevocable +acceptance of this Licence and all of its terms and conditions. + +Similarly, you irrevocably accept this Licence and all of its terms and +conditions by exercising any rights granted to You by Article 2 of this Licence, +such as the use of the Work, the creation by You of a Derivative Work or the +Distribution or Communication by You of the Work or copies thereof. + +11. Information to the public + +In case of any Distribution or Communication of the Work by means of electronic +communication by You (for example, by offering to download the Work from a +remote location) the distribution channel or media (for example, a website) must +at least provide to the public the information requested by the applicable law +regarding the Licensor, the Licence and the way it may be accessible, concluded, +stored and reproduced by the Licensee. + +12. Termination of the Licence + +The Licence and the rights granted hereunder will terminate automatically upon +any breach by the Licensee of the terms of the Licence. + +Such a termination will not terminate the licences of any person who has +received the Work from the Licensee under the Licence, provided such persons +remain in full compliance with the Licence. + +13. Miscellaneous + +Without prejudice of Article 9 above, the Licence represents the complete +agreement between the Parties as to the Work. + +If any provision of the Licence is invalid or unenforceable under applicable +law, this will not affect the validity or enforceability of the Licence as a +whole. Such provision will be construed or reformed so as necessary to make it +valid and enforceable. + +The European Commission may publish other linguistic versions or new versions of +this Licence or updated versions of the Appendix, so far this is required and +reasonable, without reducing the scope of the rights granted by the Licence. New +versions of the Licence will be published with a unique version number. + +All linguistic versions of this Licence, approved by the European Commission, +have identical value. Parties can take advantage of the linguistic version of +their choice. + +14. Jurisdiction + +Without prejudice to specific agreement between parties, + +- any litigation resulting from the interpretation of this License, arising + between the European Union institutions, bodies, offices or agencies, as a + Licensor, and any Licensee, will be subject to the jurisdiction of the Court + of Justice of the European Union, as laid down in article 272 of the Treaty on + the Functioning of the European Union, + +- any litigation arising between other parties and resulting from the + interpretation of this License, will be subject to the exclusive jurisdiction + of the competent court where the Licensor resides or conducts its primary + business. + +15. Applicable Law + +Without prejudice to specific agreement between parties, + +- this Licence shall be governed by the law of the European Union Member State + where the Licensor has his seat, resides or has his registered office, + +- this licence shall be governed by Belgian law if the Licensor has no seat, + residence or registered office inside a European Union Member State. + +Appendix + +‘Compatible Licences’ according to Article 5 EUPL are: + +- GNU General Public License (GPL) v. 2, v. 3 +- GNU Affero General Public License (AGPL) v. 3 +- Open Software License (OSL) v. 2.1, v. 3.0 +- Eclipse Public License (EPL) v. 1.0 +- CeCILL v. 2.0, v. 2.1 +- Mozilla Public Licence (MPL) v. 2 +- GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3 +- Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for + works other than software +- European Union Public Licence (EUPL) v. 1.1, v. 1.2 +- Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong + Reciprocity (LiLiQ-R+). + +The European Commission may update this Appendix to later versions of the above +licences without producing a new version of the EUPL, as long as they provide +the rights granted in Article 2 of this Licence and protect the covered Source +Code from exclusive appropriation. + +All other changes or additions to this Appendix require the production of a new +EUPL version. diff --git a/README.md b/README.md index e9f1e229..22b7401a 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,92 @@ -[![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 -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)](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, wrappers and extra packages meant to be used by people who are deploying their Jekyll builds to another server with a CI. 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. +1. `jvconseil/jekyll-docker`: Includes tools. +2. `jvconseil/jekyll`: Standard image. +3. `jvconseil/jekyll-minimal`: Very minimal image. + +### Builder + +The builder image (`jvconseil/jekyll-docker`) 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. + +#### Usage + +```sh +export JEKYLL_VERSION=4.3.3 +docker run --rm \ + --volume="$PWD:/srv/jekyll:Z" \ + -it jvconseil/jekyll-docker:$JEKYLL_VERSION \ + jekyll build +``` -### Standard +### Standard (unsupported) -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.3 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ - -it jekyll/jekyll:$JEKYLL_VERSION \ + -it jvconseil/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% +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 + 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 jekyll/jekyll \ + -it jvconseil/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. - -#### Usage - -```sh -export JEKYLL_VERSION=3.8 -docker run --rm \ - --volume="$PWD:/srv/jekyll:Z" \ - -it jekyll/builder:$JEKYLL_VERSION \ - jekyll build -``` -### Minimal +### Minimal (unsupported) -The minimal image skips all the extra gems, all the extra dev dependencies and leaves a very small image to download. This is intended for people who do not need anything extra but Jekyll. +The minimal image (`jvconseil/jekyll-minimal`) skips all the extra gems, all the extra dev dependencies and leaves a very small image to download. This is intended for people who do not need anything extra but Jekyll. #### Usage ***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.3 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ - -it jekyll/minimal:$JEKYLL_VERSION \ + -it jvconseil/jekyll-minimal:$JEKYLL_VERSION \ jekyll build ``` @@ -73,12 +95,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/jekyll/jekyll jekyll new . +podman run -ti --rm -v .:/srv/jekyll -e JEKYLL_ROOTLESS=1 docker.io/jvconseil/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 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 @@ -86,22 +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.3"` 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.3 docker run --rm \ --volume="$PWD:/srv/jekyll:Z" \ - -it jekyll/jekyll:$JEKYLL_VERSION \ + -it jvconseil/jekyll:$JEKYLL_VERSION \ bundle update ``` @@ -116,38 +139,44 @@ 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.3 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 ``` + ***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 +## Credits -```sh -script/build -``` +This Docker image is inspired by and builds on functionality in , with both feature and version improvements. + +## 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) + + -[1]: https://travis-ci.org/jekyll/docker [2]: http://jekyllrb.com/docs/configuration/#build-command-options diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/bundle b/copy/all/usr/jekyll/bin/bundle similarity index 100% rename from repos/jekyll/copy/all/usr/jekyll/bin/bundle rename to copy/all/usr/jekyll/bin/bundle diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/connected b/copy/all/usr/jekyll/bin/connected similarity index 100% rename from repos/jekyll/copy/all/usr/jekyll/bin/connected rename to copy/all/usr/jekyll/bin/connected diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/default-args b/copy/all/usr/jekyll/bin/default-args similarity index 100% rename from repos/jekyll/copy/all/usr/jekyll/bin/default-args rename to copy/all/usr/jekyll/bin/default-args diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/default-gem-permissions b/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 copy/all/usr/jekyll/bin/default-gem-permissions diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/entrypoint b/copy/all/usr/jekyll/bin/entrypoint similarity index 100% rename from repos/jekyll/copy/all/usr/jekyll/bin/entrypoint rename to copy/all/usr/jekyll/bin/entrypoint diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/gem b/copy/all/usr/jekyll/bin/gem similarity index 100% rename from repos/jekyll/copy/all/usr/jekyll/bin/gem rename to copy/all/usr/jekyll/bin/gem diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/jekyll b/copy/all/usr/jekyll/bin/jekyll similarity index 100% rename from repos/jekyll/copy/all/usr/jekyll/bin/jekyll rename to copy/all/usr/jekyll/bin/jekyll diff --git a/opts.yml b/opts.yml deleted file mode 100644 index 465b6304..00000000 --- a/opts.yml +++ /dev/null @@ -1,13 +0,0 @@ -base_image: ruby:3.1.1-alpine3.15 -user: jekyll -aliases: - latest: 4.2.2 - stable: 4.2.2 - 4.0: 4.2.2 - 4: 4.2.2 -tags: - 4.2.2: stable - pages: pages -releases: - tag: - pages: 3.8.5 # 05-15-2020 diff --git a/repos/builder/Dockerfile b/repos/builder/Dockerfile deleted file mode 120000 index 0f405143..00000000 --- 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 f9b3c8fb..00000000 --- a/repos/builder/copy +++ /dev/null @@ -1 +0,0 @@ -../jekyll/copy \ No newline at end of file diff --git a/repos/builder/opts.yml b/repos/builder/opts.yml deleted file mode 100644 index 072bc638..00000000 --- a/repos/builder/opts.yml +++ /dev/null @@ -1,31 +0,0 @@ -packages: - all: - - rsync - - openssh-client - - lftp - - git -env: - all: - JEKYLL_ENV: production -gems: - all: &gems - - s3_website - - html-proofer - - jekyll-sitemap - - jekyll-mentions - - jekyll-coffeescript - - jekyll-sass-converter - - jekyll-redirect-from - - jekyll-paginate - - jekyll-compose - - jekyll-feed - - jekyll-docs - - RedCloth - - kramdown - - jemoji - - minima - group: - pages: - - *gems - - github-pages - - jekyll-github-metadata diff --git a/repos/jekyll/opts.yml b/repos/jekyll/opts.yml deleted file mode 100644 index 3b44798f..00000000 --- a/repos/jekyll/opts.yml +++ /dev/null @@ -1,28 +0,0 @@ -aliases: - builder: jekyll/builder:latest - minimal: jekyll/minimal:latest -gems: - all: - - html-proofer - - jekyll-reload - - jekyll-mentions - - jekyll-coffeescript - - jekyll-sass-converter - - jekyll-commonmark - - jekyll-paginate - - jekyll-compose - - jekyll-assets - - RedCloth - - kramdown - - jemoji - group: - relative: &relative - - jekyll-redirect-from - - jekyll-sitemap - - jekyll-feed - - minima - stable: - - *relative - pages: - - jekyll-github-metadata - - github-pages diff --git a/repos/minimal/Dockerfile b/repos/minimal/Dockerfile deleted file mode 120000 index 0f405143..00000000 --- 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 f9b3c8fb..00000000 --- a/repos/minimal/copy +++ /dev/null @@ -1 +0,0 @@ -../jekyll/copy \ No newline at end of file diff --git a/repos/minimal/opts.yml b/repos/minimal/opts.yml deleted file mode 100644 index 5cda6d2f..00000000 --- a/repos/minimal/opts.yml +++ /dev/null @@ -1,11 +0,0 @@ -gems: - all: &gems - - kramdown - - jekyll-sass-converter - - jekyll-coffeescript - - minima - group: - pages: - - *gems - - github-pages - - jekyll-github-metadata diff --git a/script/build b/script/build deleted file mode 100755 index 59ef193e..00000000 --- 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 5091f436..00000000 --- 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 bf60741c..00000000 --- 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