Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
algenty opened this issue May 3, 2022 · 0 comments

Comments

@algenty
Copy link
Contributor

algenty commented May 3, 2022

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
`

@algenty algenty changed the title Docker script to build and watch without installing (Work on wsl 2 and linux) Docker script to build and watch without installing (Works on windows with wsl 2 and linux) May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant