Skip to content

Docker script to build and watch without installing (Works on windows with wsl 2 and linux) #229

Open
@algenty

Description

@algenty

Hi,

First at all, thx a lot for your theme , i'll try it for my projet grafana-flowcharting (https://github.com/algenty/grafana-flowcharting)
I've created 2 scripts to build and watch without needed to install jekyll or ruby using docker.
Can i suggest to add it into your repo ?
vendor rep cache is ignored in .gitignore
Source : https://github.com/envygeeks/jekyll-docker/blob/master/README.md

######################### build.sh ##########################
`
#!/usr/bin/env bash

_JEKYLL_VERSION="${JEKYLL_VERSION:-3.8}"

docker run --rm \
-it --ipc=host \
--net=host \
--volume="${PWD}:/srv/jekyll:Z" \
--volume="${PWD}/vendor:/usr/local/bundle:Z" \
jekyll/jekyll:${_JEKYLL_VERSION} \
jekyll build
`

######################### watch.sh ##########################
`
#!/usr/bin/env bash

echo "$0 [port]"

_JEKYLL_VERSION="${JEKYLL_VERSION:-3.8}"
_JEKYLL_PORT=${1:-4000}

docker run --rm \
-it --ipc=host \
--net=host \
--publish ${_JEKYLL_PORT}:${_JEKYLL_PORT}
--volume="${PWD}:/srv/jekyll:Z"
--volume="${PWD}/vendor:/usr/local/bundle:Z"
jekyll/jekyll:${_JEKYLL_VERSION}
jekyll serve --port ${_JEKYLL_PORT} --watch
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions